#fixing ability system error (solved)

1 messages · Page 1 of 1 (latest)

tacit cave
#

it has something to do with the cooldown system when the textbutton text changes (for cooldown) the local script returns a error, how can i fix this? ill add the code and error message real quick

#

LocalScript:27: attempt to perform arithmetic (sub) on nil and number

#

btw i added a video because the code is too long for non nitro discord

#

its for a asym game im making

#

fixing ability system error (client)

limpid frigate
#

well.. which line is 27

#

they're cropped out in the video

tacit cave
#

script.Parent["ability buttons"][i].Text = tostring(character:WaitForChild("ability event"):GetAttribute("ability" .. tostring(i) .. "_cooldown") - i)

#

thats the specific line

#

one in the for loop

#

to like update button text

#

for cooldown

#

per second

limpid frigate
#

check the path an make sure it exists

tacit cave
#

ok

#

finally got it working with something kinda strange but still works