#Script2: Humanoid is not a valid member of Accessory

1 messages · Page 1 of 1 (latest)

cinder shoal
#

I'm not sure what I'm doing wrong with my second line of code since it used to work a while back when i first used it for my teleporting pads.
second line of code: if Part.Parent.Humanoid ~=nil then

glossy solar
#

Show the explorer where the script is

zinc turret
#

Btw you can just do if script.Parent.Humanoid

livid totemBOT
#

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

zinc turret
#

Dont need to check if its not nil

glossy solar
zinc turret
#

Btw .touched returns player.character first

#

Or the part that hits the object

#

So I'd suggest wrapping the function in a function that passes this humanoid part

#

A player touches this part right?

cinder shoal
zinc turret
#

Yeah np

#

Script.parent.Touched:Connect(function(hit)

end)

#

Hit.parent = player.character