Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Sit onTouched help?

When I touch a part, i want the player to sit down. But if they jump, the stand (like normal)

script.Parent.Touched:connect(function(hit)
	
		local Player = hit.Parent:FindFirstChild("Humanoid")
		
		
		Player.Humanoid.Sit = true

end)

1 answer

✓ Accepted answer

Player already references the humanoid and not the character. Simply change line 6 to Player.Sit.

script.Parent.Touched:connect(function(hit)

        local Player = hit.Parent:FindFirstChild("Humanoid") --"Player" referring to Humanoid


        Player.Sit = true --Player.Sit == hit.Parent.Humanoid.Sit

end)

This discussion is preserved as it was. New answers, comments, and votes are closed.