starter character scripts server script:
local player = script.Parent
local humanoid = player:WaitForChild("Humanoid")
local playername = script.Parent.Name
local playergui = game.Players:WaitForChild(player.Name).PlayerGui
local sit = game.ReplicatedStorage.Sit
local NoSit = game.ReplicatedStorage.NoSit
while wait() do
local function onSeated(isSeated, seat)
if isSeated and seat.Name == "VehicleSeat" then
sit:FireClient()
elseif isSeated == false then
NoSit:FireClient()
end
end
end
starter gui car local script:
local Depo = game:GetService("ReplicatedStorage")
local playergui = game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui')
local sit = Depo.Sit
local NoSit = Depo.NoSit
local function onSitFired()
playergui.car.Frame.Visible = true
end
sit.OnClientEvent:Connect(onSitFired)
local function onNoSitFired()
playergui.car.Frame.Visible = false
end
NoSit.OnClientEvent:Connect(onNoSitFired)

2 comments
what does line 17 do? im kinda new to the scripting
Not sure why but did not work