I have a gui with a button, and inside the button is a script, and inside the script is a sword.
Im trying to script it so that when you click the button, you get the sword inside the script.
i have searched the wiki and cant figure it out
function onClick(mouse) -- now what
script.Parent.MouseButton1Click:connect(function() local sword = script.Sword:Clone() sword.Parent = game.Players.LocalPlayer.Backpack end)
That should work!