#How do i get the player who opened a door with a key

1 messages · Page 1 of 1 (latest)

shy dragon
#

I'm making a game where meteors fall from the sky while you try to open doors and escape, and I'm trying to make so that when you open a door with a key, it fires the client (on the server script) and then a local script gets the player and makes them not able to move for 7 seconds while they open a door.

I need help getting the player as right now I'm checking if the key touches something and it's the correct door, it will destroy the door and key, but I don't know how to get the player from that interaction.

Here is the code:

(the on client event script is the server script and the one who receives it is the local script)

#

Sorry if i take very long to respond, time zones.

median compass
shy dragon
#

i dont have a client it just gives me error cause it doesnt have a player to pass to the local script

strong frostBOT
#

studio** You are now Level 2! **studio

fair orbit
shy dragon