Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would i create a script that takes the tool out of the script?

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

1 answer

script.Parent.MouseButton1Click:connect(function()
	local sword = script.Sword:Clone()
	sword.Parent = game.Players.LocalPlayer.Backpack
end)

That should work!

This discussion is preserved as it was. New answers, comments, and votes are closed.