I'm trying to make a crate system, I did all the things but it doesn't give the player the tool. I'm using the right parents and all of the other things. This is the script:
local SS = game:GetService("ServerStorage") local Items = {SS.DefaultSword, SS.Sword} script.Parent.MouseButton1Click:connect(function() local item = Items[math.random(1, #Items)] item:Clone().Parent = game.Players.LocalPlayer.Backpack end)
Thanks, MajinBluee
Hello there. The reason it doesn't work is because you cannot access the ServerStorage in local scripts and cloning will not replicate on local scripts. I highly suggest you use a remote event to fire server when the button is clicked, and let the cloning take place on the server.. I will not be providing scripts as I do not wish to make free stuff for you but I am sure this will help. https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events If this helped, please accept answer and if there are anymore, report any more issues in the comments. Accepting answer gives us both rep and marks the question answered.. Thanks!