Studio Freezes When Attempting To Get Seat Occupant

For some reason, whenever I attempt to get the occupant of a seat in Roblox Studio, it freezes the game if there is an occupant.

I have not seen anything like this before and nobody on the DevForums has experienced this issue.

Any help?

script please


1 Like

The script doesn’t have to do with it, but here:

while wait(1) do
  print(game.Workspace.Seat.Occupant)
end

It prints nil (as it should) until someone sits on it, then it freezes.

Is there any other part of the script missing? This seems like it shouldn’t be happening.

Try placing the script into the part and changing it to the following:

while task.wait(1) do
  print(script.Parent.Occupant)
end

nope. It prints nil until a player is sat. And the part is correct, but I can’t do script.Parent because it’s in ServerScriptService. but the problem is fixed, I did something else.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.