Script suddenly broke without being edited

I have a skill tree script that was working fine litterally 3 hours ago, i published and tested everything and it was working 100%, came back to make some changes to others parts of the game unrelated to the skill tree, nothing i edited has any relation to the skill tree, however when i went to use the skill tree in game, i couldn’t open it, I checked F9 and it gave me the error “Object does not exist in folder “Categories””, i checked and the part did exist in the folder, there were no grammatical/spelling errors of any kind

So i copy and pasted the line the error was at and it fixed it, but now its giving me a different error “Attempt to preform arithmetic (sub) on nil and number”, as if the part its getting the Y value from doesn’t exist ???

I tried copy and pasting the whole script, and copy and pasting the part its getting the Y value from, yet its still broken, I haven’t touched this script in ages because it hasn’t been broken or needed changing, neither have I touched the Part, It makes 0 sense to me why it doesn’t work anymore even though nothing changed from the last update where it was working up to now.

Any errors occurring?
I dont know if you mentioned this

I seem to have fixed it by replacing

local yLevel = skillTreeObject.Categories.Fire.Position.Y


local yLevel = skillTreeObject.Categories:FindFirstChild("Fire").Position.Y

however its still extremely bizzare how it broke

1 Like

This usually occurs when the game is still sort of loading. Or if the script does not think that the object inside of the item does not exist.
So when you do categories.Fire it will think that it is a property of categories
So when using FindFirstChild() it knows to look for a child and not a property of categories

Glad you figured it out!

1 Like

That sorta makes sense, i figure thats more of a roblox inconsistency than a formatting issue ? at least now i know what to expect if this sort of error happens again, i appreciate the insight.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.