Can anyone assist me if they can? I made a GUI eject button for when i enter the bus i teleport and sit on a seat, once i'm seated i then made it so that an eject button GUI pops up and i can eject, but if one person goes and sits in the bus and makes the GUI appear, it also appear for everyone else in the server and they can use it as well, I would like to know how to make it so that the GUI only appears for the player that gets seated. Also, Once i click the eject button the player teleports with the seat attach and is seated, i tried to make the player jump when it teleport but i dont know how to execute it. By the way, this is all in a local script in StarterGUI
**local db = true
local player = game.Players.LocalPlayer
local target = game.Workspace.EjectPlace
--THIS IS SEAT 1
workspace.Bus1.Truck.VS3.Body.Seats.SeatsFolder.Seat2.ChildAdded:connect(function()
player = game.Players:GetPlayerFromCharacter(workspace.Bus1.Truck.VS3.Body.Seats.SeatsFolder.Seat1.Occupant.Parent)
script.Parent.Visible = true
end)
script.Parent.MouseButton1Click:Connect(function()
if db == true then
db = false
player2.Character.HumanoidRootPart.CFrame = target.CFrame * CFrame.new(-16, 3.5, 90.505)
game.Players.LocalPlayer.Character.Humanoid.Jumping = true
script.Parent.Visible = false
db = true
end
end)
--THIS IS SEAT 2
workspace.Bus1.Truck.VS3.Body.Seats.SeatsFolder.Seat2.ChildAdded:connect(function()
player2 = game.Players:GetPlayerFromCharacter(workspace.Bus1.Truck.VS3.Body.Seats.SeatsFolder.Seat2.Occupant.Parent)
script.Parent.Visible = true
end)
script.Parent.MouseButton1Click:Connect(function()
if db == true then
db = false
player2.Character.HumanoidRootPart.CFrame = target.CFrame * CFrame.new(-16, 3.5, 90.505)
game.Players.LocalPlayer.Character.Humanoid.Jumping = true
script.Parent.Visible = false
db = true end end) --THIS IS SEAT 3 workspace.Bus1.Truck.VS3.Body.Seats.SeatsFolder.Seat3.ChildAdded:connect(function() player3 = game.Players:GetPlayerFromCharacter(workspace.Bus1.Truck.VS3.Body.Seats.SeatsFolder.Seat3.Occupant.Parent)
script.Parent.Visible = true
end) script.Parent.MouseButton1Click:Connect(function() if db == true then db = false
player3.Character.HumanoidRootPart.CFrame = target.CFrame * CFrame.new(-16, 3.5, 90.505) game.Players.LocalPlayer.Character.Humanoid.Jumping = true script.Parent.Visible = false
db = true end end) --THIS IS SEAT 4 workspace.Bus1.Truck.VS3.Body.Seats.SeatsFolder.Seat4.ChildAdded:connect(function() player4 = game.Players:GetPlayerFromCharacter(workspace.Bus1.Truck.VS3.Body.Seats.SeatsFolder.Seat4.Occupant.Parent)
script.Parent.Visible = true
end) script.Parent.MouseButton1Click:Connect(function() if db == true then db = false
player4.Character.HumanoidRootPart.CFrame = target.CFrame * CFrame.new(-16, 3.5, 90.505) game.Players.LocalPlayer.Character.Humanoid.Jumping = true script.Parent.Visible = false
db = true end end) --THIS IS SEAT 5 workspace.Bus1.Truck.VS3.Body.Seats.SeatsFolder.Seat5.ChildAdded:connect(function() player5 = game.Players:GetPlayerFromCharacter(workspace.Bus1.Truck.VS3.Body.Seats.SeatsFolder.Seat5.Occupant.Parent)
script.Parent.Visible = true
end) script.Parent.MouseButton1Click:Connect(function() if db == true then db = false player5.Character.HumanoidRootPart.CFrame = target.CFrame * CFrame.new(-16, 3.5, 90.505) game.Players.LocalPlayer.Character.Humanoid.Jumping = true script.Parent.Visible = false
db = true end end) --THIS IS SEAT 6 workspace.Bus1.Truck.VS3.Body.Seats.SeatsFolder.Seat6.ChildAdded:connect(function() player6 = game.Players:GetPlayerFromCharacter(workspace.Bus1.Truck.VS3.Body.Seats.SeatsFolder.Seat6.Occupant.Parent)
script.Parent.Visible = true
end) script.Parent.MouseButton1Click:Connect(function() if db == true then db = false
player6.Character.HumanoidRootPart.CFrame = target.CFrame * CFrame.new(-16, 3.5, 90.505) game.Players.LocalPlayer.Character.Humanoid.Jumping = true script.Parent.Visible = false
db = true end end)**

1 comment
lol, this was in the discord xd