Okay i've been having this really annoying issue, what i'm trying to do is make a space station with an airlock, when you touch the outer airlock hitbox the server script sends a FireClient event that the player receives, then the client receives it and activates a fly local script, i'm having some issues with the server script, any help?
✓ ANSWER ACCEPTED
Unable to cast value to Object?
1 answer
✓ Accepted answer
When you FireClient, the first argument must be the player you want to fire the event for. You've currently given it player1.Name, which is a string (which is why it is Unable to cast value to Object -- it can't turn a string into a player!). You probably want to do :FireClient(player1, player1.Name) (skip the local player2 = player1.Name as that variable name is misleading). Don't forget to make sure that player1 exists after assigning to it: if not player1 then return end (ie only fire the :FireClient line if player1 is not nil).
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Please show code on this site so we do not have to go to another site to see it.
https://forum.scriptinghelpers.org/topic/189/please-share-links-correctly
wew your code is messy im not gonna help u
how is my code messy you bloody carrot