I did this: It detects the signal and transfers it from a Local Script to a Script but the Remove event doesn't do anything... and it only works on Studio Test Mode... Can someone help? Local Script:
function Remove() print(1) game:FindFirstChild("ReplicatedStorage").RemoteEvent:FireServer("remove",game.Players.LocalPlayer) end --\/ Remove Event game.Players.PlayerRemoving:Connect(Remove)
Using a Remote Event to transfer the signal
Script
function Check("Word") print(2) If Word == "Remove" then --Removing scripts end game:FindFirstChild("ReplicatedStorage").RemoteEvent.OnServerEvent(Check)
No need to send remote to detect if player is leaving or joining. PlayerAdded and PlayerRemoving are events that can run on server. Also remote event has player that sent the event as first parameter and word shouldn't have quotation marks so you would need to have:
function Check(player,word)
I think you did a problem that deserve the whole script wasn't work.
The print(1) and print(2) must have quotation marks, you must do print("1") and print("2") instead of print(1) and print(2).
I just think that error occurred the whole script...
Don't wrong this simple problem again, hope I helped and bye! :3