This is what I have currently, in the seat.
seat = script.Parent teams = game:GetService("Teams") seat.Changed:Connect(function() local occupant = seat.Occupant if occupant then local character = occupant.Parent local player = game.Players:GetPlayerFromCharacter(character) if player.TeamColor ~= ("New Yeller") then seat.Disabled = true seat.Disabled = false end else end end)
However it gave me this error: Maximum event re-entrancy depth exceeded for Instance.Changed
And this error: While entering function defined in script 'Workspace.Kingseat.Seat.Script', line 4
Edit: I also tried this but it still does not work, however it outputs no error.
seat = script.Parent teams = game:GetService("Teams") seat.Touched:Connect(function() wait(0.1) local occupant = seat.Occupant if occupant then local character = occupant.Parent local player = game.Players:GetPlayerFromCharacter(character) if player.TeamColor ~= ("New Yeller") then seat.Disabled = true seat.Disabled = false end else end end)