so my server to client remote event isn't working. it is supposed to highlight the door handle but instead it does nothing and it doesn't have any errors.
the server script is:
01 | local openDoor = script.Parent.Parent.Parent.DoorOpen |
02 |
03 | local closeDoor = script.Parent.Parent.Parent.DoorClose |
04 |
05 | local move = script.Parent.Parent.Move |
06 | local selection = script.Parent.SelectionBox |
07 |
08 | local open = script.Parent.Parent.Open.Value |
09 |
10 |
11 |
12 | local clickdetector = script.Parent.ClickDetector |
13 |
14 |
15 |
the local script is:
1 | script.Parent.OnClientEvent:Connect( function (plr,selection) |
2 | selection.Visible = true |
3 | end ) |
The problem is, you have the localscript in the RemoteEvent, that doesn't work.
All you have to do is move the local script to StarterPlayer->StarterPlayerScripts
And then change the code to this:
1 | local remoteEvent = game:GetService( "ReplicatedStorage" ):WaitForChild( "Hover" ) |
2 | remoteEvent.OnClientEvent:Connect( function (selection) --Note that it doesn't give you the plr value, when you do the :FireClient() the first value is the player you want to fire it to, and then the rest of the values is passed to the client. |
3 | selection.Visible = true |
4 | end ) |