Hello I want to make a button that when clicked, it makes seated players stand up, I tried the following script but it doesn’t go, the game gives to me error cause it try to get nill with parent inside the brakets, can anyone help me ?
for i,v in ipairs(Plot1:GetDescendants()) do
if v:IsA("Seat") then
if v.Occupant then
local player = game.Players:GetPlayerFromCharacter(v.Occupant.Parent)
if player then
player.Character:FindFirstChild("Humanoid").Sit = false
end
end
end
end