Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Can't get my RemoveEvent to work? any tips?

Asked by 5 years ago
Edited 5 years ago

FIXED. When i F9'ed for the log. I forgot to check the Server-Log... It's all working

Howdy!

So, i'm working on a script that fires a RemoteEvent in ReplicatedStorage. It's fired from a LocalScript in a PlayerGui.

It fires the remote like this

RemotePlace1 = game.ReplicatedStorage.RemotePlace1
RemotePlace1:FireServer()

The Receiverscript is stored in ServerScriptService

That script is this:

OurEvent = game.ReplicatedStorage.RemotePlace1


OurEvent.OnServerEvent:Connect(function()
    print("OOF")
end)

But, i don't get it to work :-/

Anyone in here who can tell me what i'm doing wrong?

2 answers

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Howdyy! Since I see nothing else wrong with it, then the problem must be in getting the signal on the button, If the LocalScript is inside the button, then is it

script.Parent.MouseButton1Click:Connect(function()
RemoteEvent:FireServer()
end)

?

0
SI, i did. It's this line: RemotePlace1 = game.ReplicatedStorage.RemotePlace1 HeadlessDeathSpeaker 9 — 5y
0
Could you please elaborate about the location of the LocalScript? shanelaw12 64 — 5y
0
Why is the localscript placed in PlayerGui? If you would tell me the exact location of it then I'll be able to help shanelaw12 64 — 5y
0
It's in LocalScript because it has to register when the person hits a GuiButton. Once pressed it should register is by fireing the event. It saves the data server-wide (for a little experiment)/ it's placed in PlayerGui. script.Parent(Button).Parent(Frame).Parent(ScreenGui).Parent(StarterGui) HeadlessDeathSpeaker 9 — 5y
View all comments (3 more)
0
I've added edits to the answer, maybe it should help out shanelaw12 64 — 5y
0
It didn't work :-/ HeadlessDeathSpeaker 9 — 5y
0
change the name of the remotevent into something without any capitals, and without any numbers. try that shanelaw12 64 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

I only have two ideas to make it work.

1: You might've forgotten to actually create the remoteEvent

2: You should try placing the server-side script inside your workspace

1
I've fixed it. See my post xD HeadlessDeathSpeaker 9 — 5y
0
Nice! Vinceberget 1420 — 5y

Answer this question