Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

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)


0
whats the problem? Benbebop 1049 — 5y
0
i cant set the jump power to the money value ollienoah 0 — 5y
0
Looking at the code it is hard to tell exacting what you are trying to accomplish, why are you calling playeradded twice? doncellanerdy 21 — 4y

1 answer

Log in to vote
0
Answered by
Benbebop 1049 Moderation Voter
5 years ago
Edited 5 years ago

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
0
no i want the money.value to = the jump power ollienoah 0 — 5y
0
So you want the money to be based on the jump power? Benbebop 1049 — 5y
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. Benbebop 1049 — 5y
0
no ollienoah 0 — 5y
View all comments (13 more)
0
well i'm not too sure what the problem is then, this should work Benbebop 1049 — 5y
0
no i want the jump value the same as the money value ollienoah 0 — 5y
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. Benbebop 1049 — 5y
0
wich one ollienoah 0 — 5y
0
your original script should still work Benbebop 1049 — 5y
0
so i make it a local script and put it where? ollienoah 0 — 5y
0
Most likely the StarterPack should work since anything in there gets dumped into the backpack when a new player joins Benbebop 1049 — 5y
0
it dosnt work can i just invite you to edit the game to help me ollienoah 0 — 5y
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. Benbebop 1049 — 4y
0
i sent u friend request on roblox ollienoah 0 — 4y
0
Heres the source that I usually use: https://developer.roblox.com/en-us sorry Benbebop 1049 — 4y
0
can u accept my freind request ollienoah 0 — 4y
0
Sorry id rather not, trying to keep my friends list short. Restricted to people I know personally. Benbebop 1049 — 4y
Ad

Answer this question