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

How do i check all players that are seated in a model?

So, this is my idea, if a parts is going to get touched by a model, i want all players who are seating in the model to teleport. My question is: how do i check all players that are seated in a model?

local part = script.Parent

part.Touched:Connect(function(hit)
	
if hit.Parent.ArmyTruck then
	print("Army Truck")
	local players = game.Players
	
end
end)

This is the code.

1 answer

✓ Accepted answer

Every player's character has humanoid and there is a bool value (true or false value) called sit in the player's humanoid. So when the player sits, the value changes to true and so on...

You can check every player's sit value and teleport them

2 comments

0

ah thank you

0

No problem ;)

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