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

How do you "lock" a seat?

Asked by
Protune 15
9 years ago

How would you lock a seat, so a user can't press the spacebar to get up?

I want to use this in a vehicle, so anchoring isn't an option. I've tried adding a weld with a script, but that doesn't work.

Any ideas?

1 answer

Log in to vote
0
Answered by
Wizzy011 245 Moderation Voter
9 years ago

If you add the following code, it should work:

script.Parent.ChildAdded:connect(function(part)
    if part.Name == "SeatWeld" then
        part.Name = "Weld"
    end
end)

What this code does is, it changing the name of the SeatWeld to just a Weld, if you do this, the weld won't be removed when a user presses spacebar.

Ad

Answer this question