Im new to scripting and trying to learn remote events and button presses rn but my code is not working. I have two scripts here. one of them is suppose to send a event when Q button is pressed and the other one is suppose to see this and pick it up.
#Remote event problems
1 messages · Page 1 of 1 (latest)
Case matters
wdym
the r is lowercase in one spot and uppercase in the other
varaible name's case need to match
otherise they are different varaibles
in this context, RemoteEvent is nil but remoteEvent is an actual remote event
the code you probably meant to write is remoteEvent:FireServer()
lemme see
Comparisons require two equals, not one
It should be ....Visible == true...
Also that code can be simplified to
local frame = script.Parent.Frame
frame.Visible = not frame.Visible
oh
Both of these are local scripts, :FireServer() fires an event to server scripts, not other local scripts
I think you meant to use :Fire() and .Event:Conect() on a BindableEvent
Yes but you don't have to pass the event as an argument
is it fireClient or FireServer
oh sorry
its neither of those
The script yoru trying to send this event to is on the client
So you need to use a BindableEvent, not a RemoteEvent
how do you do that
*and the script your trying to send from is also on the client
Delete the remote event and replace it with a bindable event
k
And then use :Fire()
like this? @valid spoke
Yes but you don't need to pass the event as an argument, ReplicatedStorage.FrameShowQ:Fire() will work
Did you also replace the FrameShowQ event with a bindable event?
just :Fire
Okay then you need to do this
first thing I did
You have it as Enum.Keycode.q its case sensitive its gotta be Enum.KeyCode.Q
Just press enter if you see the thing that you want that roblox studio is suggestion you to use. That way you wont have the upper-lower case problem anymore.
srry for not being on. it was getting late and I was tired @quick solar @quasi lake
all good, it was just a tip afterall