local allseats = game.Workspace.Building1["Swan ride 2"]["All Seats"]
local seat1 = allseats.Seat1
local seat2 = allseats.Seat2
local seat3 = allseats.Seat3
local seat4 = allseats.Seat4
local seat5 = allseats.Seat5
local seat6 = allseats.Seat6
local seat7 = allseats.Seat7
local seat8 = allseats.Seat8
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if seat1.Claimed.Value == false then
character.HumanoidRootPart.CFrame = seat1.CFrame
elseif seat2.Claimed.Value == false then
character.HumanoidRootPart.CFrame = seat2.CFrame
elseif seat3.Claimed.Value == false then
character.HumanoidRootPart.CFrame = seat3.CFrame
elseif seat4.Claimed.Value == false then
character.HumanoidRootPart.CFrame = seat4.CFrame
elseif seat5.Claimed.Value == false then
character.HumanoidRootPart.CFrame = seat5.CFrame
elseif seat6.Claimed.Value == false then
character.HumanoidRootPart.CFrame = seat6.CFrame
elseif seat7.Claimed.Value == false then
character.HumanoidRootPart.CFrame = seat7.CFrame
elseif seat8.Claimed.Value == false then
character.HumanoidRootPart.CFrame = seat8.CFrame
end
end)
end)```
#Seating script is bugged!
23 messages · Page 1 of 1 (latest)
When players are joined.. There supposed to go to seats
but some reason. When I tested. I just teleported to the first seated
as seen in that picture
Why a lot of statements? with iteration u can get the same just with the i
like
local seat = allseats["Seat" .. i]
and doesnt have to do a lot of ifs
😭I want to go jump off a building after reading that code
You're never setting the Claimed.Value to true
Just do player.Character.Humanoid:Sit(seat)
And instead of claimed.Value, check if the seat.Occupant == nil
Can you fo it for me?
No
Replace each if with
if not seat(number).Occupant then ...
I know but I don't have the energy to do this rn
well you dont need to
** You are now Level 13! **
still having trouble?
no compa