local seat = script.Parent
local fragment = workspace.YourFragmentNameHere
local function OnPlayerSit(player)
fragment.Visible = true
end
local function OnPlayerLeave(player)
fragment.Visible = false
end
seat.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
OnPlayerSit(player)
end
end)
seat.ChildRemoved:Connect(function(child)
local player = game.Players:GetPlayerFromCharacter(child)
if player then
OnPlayerLeave(player)
end
end)