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

Why can't I fire my remote event?

Hi there, thanks for reading. So, for my game, I was having troubles doing everything by time, so, I decided to do a remote event. The remote event's in the replicated storage, which is named Drop. Script when remote event's fired:

game.ReplicatedStorage.Drop.OnServerEvent:Connect(function(plr)
	
	wait(10)
	workspace.HereYouComeAgainDrop.Anchored = false
	wait(1)
	workspace.TheFirstTalkingGuiDrop.Anchored = false
	
end)

Script to fire it:

script.Parent.MouseButton1Click:Connect(function()
	
	game.ReplicatedStorage.Drop:FireClient()

	script.Parent.Parent.Parent.Enabled = false

end)

Now, this script doesn't work... It won't close the GUI, so, I don't even know if the FireClient works. If you give an answer, please help me, or correct this, instead of simply sending me to a website. I tried the remote event article on the developer website, but it didn't help. Thank you!

2 answers

Simple problem, you have to FireServer() since its from the client. FireClient() only works from the server and you would have to pass a "Player" param.

script.Parent.MouseButton1Click:Connect(function()

    game.ReplicatedStorage.Drop:FireServer()

    script.Parent.Parent.Parent.Enabled = false

end)

1 comment

1

Hi! Thanks so much for responding, this helped! Thanks again!

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