I need help with script

I am a new scripter, and I want to know how to make a player have a certain jump power, so I was trying to test. I was going to try to give myself 100 jump power. There is an error in my script though. I said:
if Player.Name = “bradthecoolkid2017”
then Player.JumpPower = 100
The error is in the first line on the = sign.

1 Like

Your code is not complete. You can’t just write half of an if statement and expect it to work. Don’t just eyeball it.

What you want to do is when you join the game (listening for PlayerAdded) give yourself the jump power.

game:GetService("Players").PlayerAdded:Connect(function(player)
    if player.Name ~= "bradthecoolkid2017" then
        return
    end

    player.CharacterAdded:Connect(function(character)
        character:WaitForChild("Humanoid").JumpPower = 100
    end)
end)
1 Like

It did not work.
30 Char 30 Char

The jump power property is in the humanoid of the player’s character, not the player. (Character is their avatar in workspace)

Do you have any tips for where I can learn how to script?

Change first if statement to ==

Try

game.Players.PlayerAdded:Connect (function (plr)
if plr.Name == "bradthecoolkid2017" then
plr:WaitForChild ("Humanoid").JumpPower = 100


-- dont know if this works though, try it out

Try YouTube, or the roblox dev hub.

Read articles on devforum, watch youtube tutorials, try out things and most importantly practice.

Nope.
30303030CharCharCharChar

1 Like

How did it not work? I just tested it on myself; it should be no different to you.

Do you get any errors in the output?

There are like 15 other scripts in my game with leaderstats, they might’ve interfered.

Other scripts shouldn’t matter in this situation.

I didn’t Check the output.
30 char

Idk then lol
30 char 30 char 30 char

Hello.

So, you’re attempting to access a value that does not exist with Player. Roblox has some excellent documentation for this kind of stuff and the advice given above will help too. However, my suggestion for you is to familiarize yourself with Lua before attempting the Roblox engine.

Wait, you forgot to put the end) at the bottom of my script, my apologies, do the script i sent you, and insert an “end)”

I did the end) and there was an error, but when I just did end it didn’t have an error.

Also it didnt work.
30 char 30