Simple RemoteEvent Not Working?

I have this remote event script but its not working. All the documentation says it should work but it just doesn’t?

ServerScript

script.Parent.ProximityPrompt.Triggered:Connect(function(player)
	print("fired") -- Does print
	game:GetService("ReplicatedStorage").RemoteEvent:FireClient(player)
end)

LocalScript – tried changing the locations, workspace, serverscriptservice, etc still didn’t work

game:GetService("ReplicatedStorage").RemoteEvent.OnClientEvent:Connect(function()
	print("check if worked") -- Doesn't print?!?!?!
end)

I don’t know why this isn’t working, Ive used remoteevents before and nothing seems wrong with this, no errors.

Where did you put the local script? Are you sure it’s running? Is the remote event loaded in when the server is firing the client?

1 Like

Are there any errors?

Check if the client is receiving the RemoteEvent:

  • Add a print statement before firing the RemoteEvent to verify that the server is reaching that point in the code

Where is your script located?
StarterPlayerScripts, StarterCharacterScripts, Backpack, PlayerGui?

1 Like

From what I see, the problem is where you put the LocalScript. LocalScript works only in the context of clients, like StarterPlayerScripts, StarterCharacterScripts, StarterGui, etc. There’s nothing really wrong with the script at all, only the location.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.