How do I make it to where when a player sits on the seat GUI pops up on their screen? This is as far as I've gotten knowing what I know at the moment.
1 | player = game.Players:GetPlayerFromCharacter(script.Parent) |
2 |
3 | script.Parent.Touched:connect( function (hit) |
4 | if player then |
5 |
6 | end |
7 | end ) |
I don't know if this is all correct. Let me know what I should do and if you could, tell me what part(s) in scripting I should learn so next time when I want to do something like this I know exactly what to do. Thanks
Try this it should work.
01 | put = script.Parent.Input |
02 | s = script.Parent |
03 |
04 | bounce = false |
05 |
06 | function t(p) |
07 | if bounce = = true then return end |
08 | bounce = true |
09 | local h = p.Parent:findFirstChild( "Humanoid" ) |
10 | if h ~ = nil then |
11 | gui = put:GetChildren() |
12 | for i = 1 , #gui do |
13 | if gui [ i ] .className = = "ScreenGui" then |
14 | x = gui [ i ] :clone() |
15 | player = game.Players:GetPlayerFromCharacter(p.Parent) |