This script is supposed to kick out a player that has not bought the helicopter. But it didnt do so when I tested it out. Any ideas?
-RadioactiveSherbet
local pn = script.Parent.Parent.PlayerData.PlayerName.Value
local seat = script.Parent
seat.Changed:connect(function(property)
if property ~= 'Occupant' then return end
local occupant = seat.Occupant
if occupant then
local character = occupant.Parent
local player = game.Players:GetPlayerFromCharacter(character)
if player.Name == pn then
else
character.Humanoid.Jump = true
character.Humanoid.Jump = false
end
else
print("Someone left the seat")
end
end)
