I made this long script, and it only works in studio....
Player = game.Players.LocalPlayer Cube = script.Parent local Workspace = game.Workspace mouse = Player:GetMouse() function onEquipped() Cube.Handle.Equipped:Play() end local GearFolder = game.ServerStorage.SwordsFolder local MovementGearNames = { "BlackAndWhiteWingedSword", "BombosSurvivalKnife", } function Click() while true do for i,v in pairs(GearFolder:GetChildren())do if v.Name == MovementGearNames[math.random(1, #MovementGearNames)] then wait(0.01) v.Enabled = true local Sound = Instance.new("Sound",script.Parent.Handle) Sound.SoundId = "rbxassetid://163362522" Sound.Volume = 1 Sound.Pitch = 1 Sound.Looped = false Sound.Name = "GearSound" local Gear = v:Clone() Gear.Parent = Player.Backpack Sound:Play() print(Player.Name,"Got", v.Name.."!") wait(0.01) script.Parent:Destroy() end end end end Cube.Activated:connect(Click) Cube.Equipped:connect(onEquipped)
Problem
The only problem I can see is that since it works in studio and not in server it should be a latency problem, this happens because in studio everything is pretty much local so you don't have to wait for a server to create stuff so your local scripts run instantly. In server this doesn't happen as when a local scripts cause upons something in player or character that is server-sided then the local script is "local" which makes it run faster then the server can respond.
Solution
repeat wait() until game.Players.LocalPlayer.Character--To the top of every local script
I was experiencing this problem too. I was wondering what was going on and I will edit in a fix when I find one! Also in online mode do F9 or fn+F9 if F9 colored the same as the fn key and it will show the output. That might help you.