I'm trying to make it so that when the player clicks on the button "Mug" it gives them a mug and changes the text to blank.~~~~~~~~~~~~~~~~~
local txt = script.Parent.Text
local mug = game.ReplicatedStorage.Mug
local button = script.Parent
button.MouseButton1Click:Connect(function()
mug.Parent = game.Players.LocalPlayer.Backpack
txt = "ToolName"
end)

1 comment
And to change the text of a button do this: script.Parent.Text = "Text here"