Ad
Log in to vote
0

create a textbutton to get out of a seat?

Asked by 4 days ago
Edited 4 days ago

I've disabled jumping in my game and I want to make a script that creates a screen gui when the player sits in a seat that teleports the out of the seat position and in front of the seat if they click it but I don't really know how to use function onTouch or how to make a script in a script in a text button in a screen gui with instance.new

does anyone know how i could do this?

also - if i do this with a local script does that mean only the person in the seat can see the gui?

Hi.

Looks like you're using an ad blocker.

That's fine...

No, it really is.

Just, I mean, we put a lot of work into this site, you know?

It would be really really appreciated if you would turn off your ad blocker for our website...

We tried really hard to make our ads as unobtrusive as possible.

If you really hate ads, would you consider a $2 donation via Patreon?

Here's the link.

We love you. We hope you love us too.

.

..

...

Now back to your regularly scheduled Scripting Helpers....

...

..

.

1 answer

Log in to vote
0
Answered by
Goulstem 7591 Administrator Badge of Merit
4 days ago

You may use the Changed event on the Seat object in order to detect when someone sits or leaves.

Connect a function to the Changed event that will manipulate the Visible Property of the occupant's (GuiButtonObject )

Use the MouseButton1Down event on the GuiButtonObject to fire the Jump function, and get the player out of the seat.

0
This means you make the button first, then reference and change it when the player sits in the seat Goulstem 7591 — 4d
Ad

Answer this question



Ad