#This doesn't work

21 messages · Page 1 of 1 (latest)

radiant obsidian
#
  1. you dont need to check if the Player is inside Players because GetPlayerFromCharacter only works with Players
  2. you need to do players[player.Name]
#

no its an PlayerInstance

#

oh, Players isnt game.Players so igonre the 1st one

#

that would also work

#

the probel is how you insert the player in to the Table

#

players = player replaces the table with the Player
so Players isnt a Table anymore, what means players[playerName] doesnt work
because it seaches for an instance called the Player name inside the Player
...

#

do players[player] = true (true is just a Placeholder)

#

when we set it to nil it gets deleted
so it needs to be something
because we just use the Key, we dont have anny value to put there

#

also you should check if it is a player before you get the name
otherwise it can give you an error sometimes

frigid quiverBOT
#

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

radiant obsidian
#

GetPlayerFromCharacter returns nil it it isnt a Player
nil.Name gives you an error

#

you dont need that GetTouchingParts

#

aso a TouchEnded event isnt the Best for this

#

it can detect like everything as Ended
you walk there and it fires like 200 times
always on/off/on/off

#

you could check the distance to the player
that would be a bit more reliable

#

it isnt

frigid quiverBOT
#

studio** You are now Level 21! **studio

radiant obsidian
#

that function does nothing

#

could be that it inserts a touch interest and GetTouchingParts dont

#

where do you print it?