Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help my script won't work (Expected 'then' when parsing if statement , got '=' ) it's normal ?

Asked by
Komas19 34
4 years ago

Help

while wait(.5) do
    local children = game.Players:GetChildren()
    for i = 1, #children do
        if children[i].Character ~= nil then
        local hum = children[i].Character.Humanoid
        hum.JumpPower = children[i].leaderstats.Jump.Value/3.12
        if game.Players.LocalPlayer.Character.Humanoid.Jump = true then
            game.Players.LocalPlayer.leaderstats.Jump.Value = game.Players.LocalPlayer.leaderstats.Jump.Value +1
        end
    end
end
end
0
Yeah, when you are trying to make an 'if true' statement, you have to put == instead of = since '==' is a comparison VVoretex 146 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

On line 7, you typed your code in wrong. You need to add another '='.

You have

if game.Players.LocalPlayer.Character.Humanoid.Jump = true then

You need

if game.Players.LocalPlayer.Character.Humanoid.Jump == true then

Do you see the difference? Anyway, this should solve your issue

Ad

Answer this question