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

Hey im trying to make the jump power my money.value can anyone help?

heres what i have right now

game.Players.PlayerAdded:connect(function(p)
local stats = Instance.new("IntValue", p)
stats.Name = "leaderstats"
local money = Instance.new("IntValue", stats)
money.Name = "Xp"
money.Value = 100
while true do
wait(3)
money.Value = money.Value + 1
print(money.Value)
game.Players.PlayerAdded:connect(function(l)
l.CharacterAdded:connect(function(c)
c.Humanoid.JumpPower = money.Value

end)
end)
end
end)


3 comments

0

whats the problem?

0

i cant set the jump power to the money value

0

Looking at the code it is hard to tell exacting what you are trying to accomplish, why are you calling playeradded twice?

1 answer

I did my best to fix it. You must assign a new instance to a parent because it is automatically set to nil. I also changes up some other stuff.

game.Players.PlayerAdded:connect(function(p)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
stats.parent = -- where ever you want it to be sent --
local money = Instance.new("IntValue")
money.Name = "Xp"
money.Value = 100
money.parent = -- where ever you want it to be sent --
end)

while true do
wait(3)
money.Value = money.Value + 1
print(money.Value)
c.Humanoid.JumpPower = money.value
end

17 comments

0

no i want the money.value to = the jump power

0

So you want the money to be based on the jump power?

0

Why would you be changing the money's value not the JumpPower's value, it will just delete it when you assign it to the JumpPower's value.

0

no

0

well i'm not too sure what the problem is then, this should work

0

no i want the jump value the same as the money value

0

oh ok I see the problem now, sorry bout that. Its doing nothing because for some reason you need to put this in a LocalScript inside the players Backpack, StarterPack should work.

0

wich one

0

your original script should still work

0

so i make it a local script and put it where?

0

Most likely the StarterPack should work since anything in there gets dumped into the backpack when a new player joins

0

it dosnt work can i just invite you to edit the game to help me

0

This is starting to get farther from my expertness, being scripting, and getting into the weird roblox engine. You will probably have to get help from someone else.

0

i sent u friend request on roblox

0

Heres the source that I usually use: https://developer.roblox.com/en-us sorry

0

can u accept my freind request

0

Sorry id rather not, trying to keep my friends list short. Restricted to people I know personally.

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