Problem: As the title says, script works in Studio but not online, no errors in output
player = game.Players.LocalPlayer local leaderstats = player:WaitForChild("leaderstats") local Tool = leaderstats:WaitForChild('WoodenSword') local cl = game.ReplicatedStorage:FindFirstChild("WoodenSword") local cl2 = cl:Clone() local Bought = script.Parent:WaitForChild('HasBought') local CurImage = script.Parent.Parent:WaitForChild('ImageLabel') local Equiped = false local UnequipedColor = BrickColor.new("Really red") local UnequipedColor2 = UnequipedColor.Color local EquipColor = BrickColor.new("Lime green") local EquipColor2 = EquipColor.Color local AnyEquiped = script.Parent.Parent.Parent.Parent.MeleeEquip local NA = script.Parent.NA local Player = game.Players.LocalPlayer local Character = player.CharacterAdded:wait() local Humanoid = Character:WaitForChild('Humanoid') local Type = script.Parent.Parent.Parent.Parent.Character.Melees.ImageLabel local sound = script.Parent.Equip function Check() if Bought.Value == true and Equiped == false and AnyEquiped.Value == false then Type.Image = script.Parent.Parent.ImageLabel.Image cl2.Parent = player.Backpack script.Parent.BackgroundColor3 = EquipColor2 AnyEquiped.Value = true Equiped = true script.Parent.Text = 'UnEquip' sound:Play() elseif Bought.Value == true and Equiped == true then Humanoid:UnequipTools() wait(.1) Type.Image = NA.Value player.Backpack:findFirstChild("WoodenSword"):remove() script.Parent.BackgroundColor3 = UnequipedColor2 AnyEquiped.Value = false Equiped = false script.Parent.Text = 'Equip' sound:Play() end end script.Parent.MouseButton1Click:connect(Check)