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

Speed and Jump boost script wont work?

In my game, you get get different souls that do different things. When the player equips this soul, its supposed to increase the players jump power and walk speed, but it wont work

(its a normal script located in StarterPlayerScripts)

local IntTrue = game.Players.LocalPlayer.SelectedSOUL.Value.Name == "Integrity"

if IntTrue then 

script.Parent.HumanoidRootPart.Humanoid.WalkSpeed = script.Parent.HumanoidRootPartHumanoid.WalkSpeed + 90
script.Parent.HumanoidRootPartHumanoid.JumpPower = script.Parent.HumanoidRootPartHumanoid.JumpPower + 90

end

But it wont work. do i have to make it a local script? or is something wrong with my code?

the output error is: 15:29:43.946 - Workspace.trimarkander.Script:1: attempt to index nil with 'SelectedSOUL'

(P.S. im new to scripting, so sorry if im really dumb rn)

5 comments

0

The script is inside the character?

0

Yes

0

the output Error says: 13:19:39.563 - Workspace.trimarkander.Effect:5: Expected , got 'end'

0

it doesn't increase my JumpPower or WalkSpeed either

0

Depending on how equipping items works in your game, you have to make the script check for it and apply the boost then

1 answer

Here is what is wrong:

Instead of doing

script.Parent.Humanoid.WalkSpeed + 10
script.Parent.Humanoid.JumpPower + 10

try

script.Parent.Humanoid.WalkSpeed = script.Parent.Humanoid.WalkSpeed + 10
script.Parent.Humanoid.JumpPower = script.Parent.Humanoid.JumpPower + 10

The reason why is because it is taking the current value of the player, and adds 10. You cant solve math without an =

12 comments

0

It still wont increase my my speed or jump power, am i doing somthing wrong? im using the utmm kit, so i dont really know how it works. the output error is 13:23:49.160 - Workspace.trimarkander.Effect:6: Expected , got 'end'

0

You can't change the humanoid's walkspeed via Localscript. You have to do it via ServerScript.

0

Wait is he using a localscript

0

im using a normal Script, is that why?

0

@trimarkander put that script in to the player. 

0

Ok, but how would i only activate the script if they have the item equiped?

0

Do you have discord @trimarkander? I can help you better there. DM me SpiralRBX#5787

0

no i dont

0

oh. hm ok well let me refer you to a view developer hub posts! https://developer.roblox.com/en-us/api-reference/event/Tool/Activated

0

its not a tool, its an armor kinda thing

0

Look at the post again, i edited it

0

help please

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