I found some weird glitch I’m sick and tired of already, because it doesn’t make sense. I am making a system where when you level up, you get an item. The script checks the ID of the reward and sifts through the ID’s of all items until it finds the reward item. This technically works as shown here:
local itemID = reward.Reward.Value
for i, v in pairs(game.ReplicatedStorage.Items.Rewards[itemType]:GetChildren()) do
for index, item in pairs(v:GetChildren()) do
print(item.ID.Value)
print(itemID)
if item.ID.Value == itemID then
print("les gooo")
When it finds the reward item, both item.ID.Value and itemID are printed in the debug 5. So clearly the if statement should be true right? 5 equals 5!!!
But no, les gooo never prints. I have no idea why. I do not know what I am doing wrong. I feel like I have failed my friends, my family. Why does item.ID.Value ~= itemID when it does!?
From now on I have no intent on calling myself an “advanced scripter”, after this I clearly do not deserve that title. Thank you for the obvious point out, you too @sir_vitamin.
I believe it is in our best interest to find a comforting compromise that expressed my dramatic concern while humbling to your professional etiquette of no cursing.