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

01while wait(.5) do
02    local children = game.Players:GetChildren()
03    for i = 1, #children do
04        if children[i].Character ~= nil then
05        local hum = children[i].Character.Humanoid
06        hum.JumpPower = children[i].leaderstats.Jump.Value/3.12
07        if game.Players.LocalPlayer.Character.Humanoid.Jump = true then
08            game.Players.LocalPlayer.leaderstats.Jump.Value = game.Players.LocalPlayer.leaderstats.Jump.Value +1
09        end
10    end
11end
12end
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

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

You need

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

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

Ad

Answer this question