I want to make it so when a Player sit's on a VehicleSeat, it clones a GUI to their PlayerGui. This Script is in the VehicleSeat:
a = script.Parent.Controls b = a:Clone() local LightSystem = script.Parent.Parent.Lights
function onChildAdded(child) if child.Name == "SeatWeld" then if child.Part1.Name == "Torso" then player = game.Players:GetPlayerFromCharacter(child.Part1.Parent) if player ~= nil then tool = b:Clone() local Lights = script.Lights:Clone() Lights.Parent = tool Lights.Value = LightSystem tool.Parent = player.PlayerGui end end end end
function onChildRemoved() if tool ~= nil then tool:Remove() end end
script.Parent.ChildAdded:connect(onChildAdded) script.Parent.ChildRemoved:connect(onChildRemoved)
There is a seat that works: http://www.roblox.com/Mark901s-AircraftSeat-item?id=36172684 ,although it is scripted you can try to edit it for your needs.