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!
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)