The cause of the error could be found at line 14
local seat = script.Parent
local sound = script.Parent.On
local off = script.Parent.Off
local player = game.Players.LocalPlayer
local ui = script.Parent:FindFirstChild("PoliceGUI")
seat.Changed:Connect(function(ch)
if ch == "Occupant" then
if seat.Occupant then
local player = game.Players:FindFirstChild(seat.Occupant.Parent.Name)
ui:Clone().Parent = player.PlayerGui
sound:Play()
end
player.PlayerGui:FindFirstChild("PoliceGUI"):Destroy()
off:Play()
end
end)

1 comment
GetPlayerFromCharacter(seat.Occupant.Parent)?