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
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.