Proximity prompt to remote event

Okay so

I’m trying to make a proximity prompt fire an event to the player who triggered it, basically client sided proximity prompt but for some reason it just doesn’t work, It fires but doesn’t receive the event

Server script:

script.Parent.ProximityPrompt.Triggered:Connect(function(player)
	print(player.Name)
	script.Parent.PipeBomb:FireClient(player)
	print("fired")
end)

Local script:

script.Parent.PipeBomb.OnClientEvent:Connect(function(player)
	print("received")
end)
1 Like

If the local script is in workspace it will not print. Put it inside of StarterPlayer.StarterPlayerScripts.

Okay, first put the local script of the Client Event on StarterPlayerScripts, then put this in the local script:

local plr = game.Players.LocalPlayer
workspace.Event.OnClientEvent:Connect(function() -- Don't put "plr" here
	print("received")
end)

(i put what the event was in workspace)

Thanks, that was the problem

30char

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