How to force all users to jump once?

I want to make all users jump once when I run my command. I can’t find a way to make all users jump once. I have tried searching up some examples, never found anything.
Here’s my lua code I want to add it to:

local admins = {"RobuxGuy235", "jees1", "iiFxllinqx", "Nicklaus_s", "mxrcvrq"};

function checkAdmin(speaker)
    local isAdmin = false;
    for a,b in pairs (admins) do
        if b == speaker.Name then
            isAdmin = true;
            break;
        end
    end
    return isAdmin
end

function onChatted(msg, speaker)
    if checkAdmin(speaker) then
        local source = string.lower(speaker.Name)
        msg = string.lower(msg)
        if msg == "/e !?camoff" then
	workspace.CameraSeats.CameraSeat.Name = "NotCameraSeat"
            end
        end
    end
game.Players.PlayerAdded:Connect(function(player)
    player.Chatted:connect(function(msg)onChatted(msg, player) end)
end)

I would want to add it after it renames the CameraSeat.

Any help is useful, thanks!

2 Likes

Just run a for loop

for _, player in ipairs(Players:GetPlayers()) do
    player.Character.Humanoid.Jump = true
end

Jump is a property of humanoids that when set to true, will cause the humanoid to jump

1 Like

You can just set each player’s humanoid’s “Jump” property to true!

for i,v in pairs(game.Players:GetPlayers()) do
   if(v.Character ~= nil) then -- Always check if the player's character exists, or it may error if the player's still loading in.
      v.Character.Humanoid.Jump = true
   end
end

That works, thanks! 30characters

1 Like