"Workspace.Wood Crate.Script:14: bad argument #1 (interval is empty)"
local serverStorage = game:GetService("ServerStorage") local players = game:GetService("Players") local weapons = serverStorage.Weapons:GetChildren() local loot = script.Parent local part = loot.PrimaryPart part.Touched:Connect(function(hit) local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid") if (humanoid and humanoid.Health > 0) then local player = players:GetPlayerFromCharacter(hit.Parent) local backpack = player:WaitForChild("Backpack") local clonedWeapon = weapons[math.random(#weapons)]:Clone() clonedWeapon.Parent = backpack loot:Destroy() end end)
It's now solved. If this happens to you, just make sure the items are in the referenced place. Like I forgot that the weapons are not in the Weapons folder. :)