Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How Can you make a Text Button Spawn a Tool?

Asked by 5 years ago
Edited 5 years ago

Im Trying to get a a text button to spawn a tool and to clear a confusion if ur confused im not using a click detector im using a Text Button You would use for screen and surface Gui

1
This site is not a request site! BashGuy10 384 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
local p = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
    local tool = script.Parent.Tool:Clone() -- Change Tool to your tool name.
    tool.Parent = p.Backpack
end)

Try this. I have tested it.

Put a local script and the tool into the TextButton.

0
This works, but if I'm correct, only locally. This could be done on the server side using a RemoteEvent. hpenney2 53 — 5y
Ad

Answer this question