You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? I want to make only low rank get jumppower 0 when button pressed.
-
What is the issue?
for i, v in pairs(game:GetService("Players"):GetChildren()) and player:GetRankInGroup(13566661) >= 3 then do
This part gets error.
- What solutions have you tried so far? Yes. but no solutions.
local AdminEvent = game:GetService("ReplicatedStorage").AdminRemote
AdminEvent.OnServerEvent:Connect(function(player, canJump)
print(canJump)
if canJump == true then
print(canJump)
for i, v in pairs(game:GetService("Players"):GetChildren()) and player:GetRankInGroup(13566661) >= 3 then do
v.Character:FindFirstChild("Humanoid").JumpPower = 0
end
player.PlayerGui.StaffPanel.Main.Jumppower.TextLabel.Text = "Enable Passenger's Jumppower."
elseif canJump == false then
print(canJump)
for i, v in pairs(game:GetService("Players"):GetChildren()) do
v.Character:FindFirstChild("Humanoid").JumpPower = 30
end
player.PlayerGui.StaffPanel.Main.Jumppower.TextLabel.Text = "Disable Passenger's Jumppower."
end
end)