Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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)

?

7 comments

0

SI, i did. It's this line: RemotePlace1 = game.ReplicatedStorage.RemotePlace1

0

Could you please elaborate about the location of the LocalScript?

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

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)

0

I've added edits to the answer, maybe it should help out

0

It didn't work :-/

0

change the name of the remotevent into something without any capitals, and without any numbers. try that

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

2 comments

1

I've fixed it. See my post xD

0

Nice!

This discussion is preserved as it was. New answers, comments, and votes are closed.