Hey guys! I hope you are doing very very well! Being direct I have a doubt about firing a remote event on the client, my question is:
Should I put the “Player Instance” or the “Player Name” when firing to the client?
ex:
RemoteEvent:FireClient(PlayerInstance)
or
RemoteEvent:FireClient(PlayerName)
In the case both of these options work, which one is better and prevents less errors? Thanks for everything and have a nice day and life! byee!
C_Sharper
(Sharpie)
#2
:FireClient()
takes a player instance as an argument, so I think it’d throw an error if you try passing the name of the player instead.
1 Like
Forummer
(Forummer)
#3
Attempt to cast string to instance.
Would be the error message.
To the thread’s poster, you didn’t need to post this thread, you could have just checked the documentation for FireClient()
.
https://developer.roblox.com/en-us/api-reference/function/RemoteEvent/FireClient
1 Like