How come my event is not working

I am trying to make a script fire a client then make a local script print something here are my scripts.



thanks!

2 Likes

1, Is there any errors? If so what are they?
2, You don’t need to use :WaitForChild() in server scripts (maybe in cases where you are using instance.new on another script)
3, You don’t need player in event.OnClientEvent:Connect(function(player) since that’s already on the client
4, Where is the local script located?

2 Likes

is there any errors in console you can check by pressing F9 or doing /console in chat!

1 Like

local script is in workspace
im checking for errors now

2 Likes

put the local script in player gui or player scripts

1 Like

Local scripts do not run in workspace unless in a character model, move it somewhere else like StarterGui

2 Likes

ok
and no there are no errors i just checked all it does is print my name

2 Likes

Yea, the code seems fine. Once you move the local script it should work fine
(still don’t need “player” in OnClientEvent)

3 Likes

Yeah the script is fine you should move the Local Script to StarterGui and it will work!

3 Likes

Thanks!! it worked after i moved it into the starter gui!!!

2 Likes

Okay, good we could help!!! :smile:

3 Likes