Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Detect if someone is sitting on the seat?

Asked by
RoyMer 301 Moderation Voter
8 years ago

Is the only way to do so is to make an onTouch to the seat and check if the player's Humanoid Sit == true?

1 answer

Log in to vote
3
Answered by 8 years ago

Assuming the script is in the seat,

script.Parent.ChildAdded:connect(function(weld)
    chr =  weld.Part1.Parent -- That is the character that is sitting in the seat.
    plr = game.Players:GetPlayerFromCharacter(chr) -- This is the player that is sitting in the seat.
    -- put code in here
end)
0
Thanks RoyMer 301 — 8y
0
No problem! laughablehaha 494 — 8y
Ad

Answer this question