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

How to make disabling and re enabling seat script?

Asked by 4 years ago

I am pretty much a noob at scripting, and I cannot find a way to make a script that disables all seats in the game for a few seconds of time but then re enables them back to being able to be sat in. I looked up about it and didn't really find anything so I don't if you can either. All help is appreciated.

0
Doesn't Roblox already do this for you? Hwk3rAlt 14 — 4y

1 answer

Log in to vote
-1
Answered by
ryan32t 306 Moderation Voter
4 years ago

Grab a Table containing all Seats in the Game and turn it's Bool Property "Disabled", to true. Then in a few seconds. Turn the Bool Property "Disabled", to false. Example:

for _,object in pairs(Game:GetDescendants()) do
if object:IsA"Seat" then
seat.Disabled = true
end
end
wait(5)
for _,seat in pairs(Game:GetDescendants()) do
if object:IsA"Seat" then
seat.Disabled = false
end
end
0
btw i hope you noticed that you can't do Class Checks with a Table containing Game Objects.. ryan32t 306 — 4y
Ad

Answer this question