--|| This is the script its erroring at the line after "Found a seat" ||--
local Prompt = script.Parent
local ActionText = "Hold F to join the car"
local HoldDuration = .8
local MaxActivationDistance = 7.5
Prompt.ActionText = ActionText
Prompt.ClickablePrompt = true
Prompt.HoldDuration = HoldDuration
Prompt.KeyboardKeyCode = Enum.KeyCode.F
Prompt.MaxActivationDistance = MaxActivationDistance
Prompt.ObjectText = "Join the car"
Prompt.RequiresLineOfSight = true
local BackSeats = script.Parent.Parent["Back Seats"]
Prompt.Triggered:Connect(function(Player)
local Character = Player.Character
if Character then
for _, seat in pairs(BackSeats:GetChildren()) do
if seat.Occupant == nil then
print("Found a seat")
seat.Occupant = Character.Humanoid
break
end
end
end
end)
Error: Can't set the value
