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

leaderstat value wont go up by leaderstat value?

Asked by 4 years ago

hi im trying to make cps for a clicking game, it worked in clicker 1 but now not in clicker 2 old script:

--cpsadd
plr = script.Parent.Parent.Parent.Parent
CPS = script.Parent.Parent.CPS
CPS2 = plr.leaderstats.CPS2

while true do
    plr.leaderstats.Food.Value = plr.leaderstats.Food.Value + CPS2.Value
    plr.leaderstats.Total_Food.Value = plr.leaderstats.Total_Food.Value + CPS2.Value
    plr.leaderstats.Total_Food_machine.Value = plr.leaderstats.Total_Food_machine.Value + CPS2.Value

    wait(1)
end

new script:

--cpsadd
plr = script.Parent.Parent.Parent.Parent
CPS = plr.leaderstats.FPS.Value

while true do
    plr.leaderstats.Food.Value = plr.leaderstats.Food.Value + CPS.Value
    wait(1)
end

apart from stat changes why wont it work, I don't think it needs or uses the physical value

All code is scripts in StarterGui in a screengui by itself

Not trying to beg, also no errors in output, it seems to run past the leaderstat values which is weird.

sorry rushed

0
How do i make a brick that only and admin can see like admen roles or something PhillipBakyl -3 — 4y
0
... make a question and dont forget to add a script attempt to it RobloxGameingStudios 145 — 4y

Answer this question