Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

1 comment

0

Yeah, when you are trying to make an 'if true' statement, you have to put == instead of = since '==' is a comparison

1 answer

✓ Accepted answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.