Everything here works, except anything past line 14 wont run, why?
JumpValu = 50 function update() print("upd8") JumpValu = 50 for i=1,8 do local StickerValue = stickers["Sticker"..i].Value if StickerValue~="" and StickerValue~="LOCKED" then if game.ServerStorage.assets.stickers:WaitForChild(StickerValue):FindFirstChild("Jump") then JumpValu = JumpValu + game.ServerStorage.assets.stickers:WaitForChild(StickerValue):FindFirstChild("Jump").Value end end end print("lol") end
When you call WaitForChild, you're checking for the sticker value instead of the sticker. Just change it to check for the sticker you're searching for.
The code you posted might not be sufficient to find a solution. I don't know what you're storing in the table, or how they might be indexed, so that might also be a problem. Let me know if this code doesn't work.
function update() print("upd8") JumpValu = 50 for i=1,8 do local sticker = stickers["Sticker"..i] local StickerValue = sticker.Value if StickerValue~="" and StickerValue~="LOCKED" then if game.ServerStorage.assets.stickers:WaitForChild(sticker):FindFirstChild("Jump") then JumpValu = JumpValu + game.ServerStorage.assets.stickers:WaitForChild(sticker):FindFirstChild("Jump").Value end end end print("lol") end update()
You did not call the function. Do this:
JumpValu = 50
function update() print("upd8") JumpValu = 50 for i=1,8 do local StickerValue = stickers["Sticker"..i].Value if StickerValue~="" and StickerValue~="LOCKED" then if game.ServerStorage.assets.stickers:WaitForChild(StickerValue):FindFirstChild("Jump") then JumpValu = JumpValu + game.ServerStorage.assets.stickers:WaitForChild(StickerValue):FindFirstChild("Jump").Value end end end print("lol") end update()