Hello, today i encountered a weird script’s behavior, basically if i don’t put a print function the script won’t work. This is my script that doesn’t work:
if equippedItem then
for i, v in pairs(equippedItem) do
player:WaitForChild("EquippedItem").Value = v
local cloned = game.ReplicatedStorage.Items:FindFirstChild(v):Clone()
cloned.Parent = player.Backpack
end
end
This is the script with the print function that works:
if equippedItem then
for i, v in pairs(equippedItem) do
print("Working")
player:WaitForChild("EquippedItem").Value = v
local cloned = game.ReplicatedStorage.Items:FindFirstChild(v):Clone()
cloned.Parent = player.Backpack
end
end
This is really weird and i don’t understand why this happens, do you have any idea?