COMMUNITY QUESTION
How do I make a "Team only vehicle seat script"?
1 answer
You need to check as soon as the occupant changed whether or not the given player is of a certain team. If he is not you can force jump him to get him out of the seat.
Example:
local seat = script.Parent -- Change this as needed
seat:GetPropertyChangedSignal("Occupant"):Connect(function()
local occupant = seat.Occupant
if occupant then
local player = game.Players:GetPlayerFromCharacter(occupant.Parent)
if player.Team ~= game.Teams.YourTeam then -- Change YourTeam
occupant.Jump = true
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
