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

I Cant find the player who is sitting?

Asked by 7 years ago
Seat = script.Parent
player = game.Players.LocalPlayer.Name

Seat.ChildAdded:connect(function(Weld) -- 
  do Weld.Parent:FindFirstChild("Humanoid")
    print(player)

end

end)     

I'm trying to find the player who is weld to the seat. then print the name of the player who is sitting on the chair

0
Weld.Part0 or Weld.Part1 should be the player's torso. Goulstem 8144 — 7y

1 answer

Log in to vote
1
Answered by 7 years ago

seat.Occupant returns the humanoid of the sitting player, so seat.Occupant.Parent.Name should give you your answer.

Ad

Answer this question