Hello I recently made this script. Basically if you're not in a specified rank in a specified group the script will remove you from the seat. The script I made isn't working and I honestly don't know why. Can someone help me? The script is a children of DriverSeat.
script.Parent.Changed:Connect(function()
if script.Parent.Occupant then
local human = game.Players:FindFirstChild("Humanoid")
if (human ~= nil) then
if game.Players[human.Parent.Name]:GetRankInGroup(3403693) >= 13 then -- rank group and id are random
else human.Jump = true
wait(0.5)
end
end
end
end)

2 comments
This can be exploited since it's client-sided.
You could always just have the seat local to players who are alowed to sit in it, and just have a part where it is that is global.