a = game.workspace.inside.Folder
print("starting")
randomseat = {a.a, a.b, a.c, a.d, a.e, a.f, a.g, a.h}
seat = randomseat[math.random(1, #randomseat)]
print(seat)
print("good")
if workspace:FindFirstChild("Player") then
print("yes")
game.Workspace.Player.HumanoidRootPart.CFrame = seat.Position
print("yesyesyes")
end
The random seat part of the code is when the player joins, the script needs to take a player to an open seat, just to clarify my intentions.
I have basically done prints to check where the script fails, I am not getting any errors, but the script is not working as intended. The output presents "starting", the seat letter(a-h[on random]), and good. However, it does not make it past the if statement. On top of that problem, I am having trouble teleporting the player to an open seat.
Some additional things that you might want to know:
I am using a regular script located as the child of the workspace
The seats are unions.
The unions go from game to workspace, to inside(Which is basically a room that is a model) to a folder, and the children of that folder are all the seats which are just a union.
I have been stuck on this problem for a week any help is appreciated, thanks!

2 comments
try removing the quotation marks in workspace:FindFirstChild("Player")
no that just gives a global error