Trying to create a control seat that when you sit on it a gui appears and gives you a switch to turn on or off anti jump seats (controls other seats so the player can't jump out of them). Would anyone know how to do this? I have extremely basic gui skills (not even basic). Thanks.. An example script would be perfect!
I'd advise looking at this article to work out how you'd detect when a player sits down.
From here, you'd simply clone your Gui into Player.PlayerGui
In your gui, find your TextButton
and insert a LocalScript
Use the MouseButton1Down
event on the button to detect when a player clicks the button.
Now to make a player "stick" to the seat, I'm not entirely sure about. There are probably easy ways to do it, but the only thing that comes to mind at the moment would be to use a Weld
to attach the player's torso to the seat.
Look at this article to learn about using welds. You'd need to set Part0 to the seat, and Part1 to the Character's torso, then change the C1 value to:
Weld.C1 = CFrame.new(0, 3, 0) --Or somewhere around that
Like I said though, I'm not entirely sure how I would do this and I've not tested anything, so by using this weld, it may automatically jump the player out of the seat.
Hope this helped.