I have made a Force Sit script, so that when I run !fsit, it will lock all players so they can not jump anymore (when they are seated). But, when I run the command again after i runned it 1 time, it does not unlock the player and give them their jumppower back.
Can anyone help me with this? This is the script that I currently have:
local requiredrank = 253
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if player:GetRankInGroup(10558052) >= requiredrank and message == "!fsit" then
for _, p in ipairs(game.Players:GetPlayers()) do
local humanoid = p.Character and p.Character:FindFirstChild("Humanoid")
if humanoid then
humanoid.UseJumpPower = true
humanoid.JumpPower = 0
end
end
print("Force sit has been enabled, jumping is now disabled.")
end
end)
end)