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

How do i make a text button invisible when you clicked it?

I've recently got this script and i want to make the text button be invisible after you clicked the text button, and when the player dies i want it to appear again.

local player = game.Players.LocalPlayer
local tool = game.ReplicatedStorage.Sword

script.Parent.MouseButton1Down:connect(function()
    if player:FindFirstChild("Backpack") then
        tool:Clone().Parent = player.Backpack
    end
end)

1 answer

✓ Accepted answer
local player = game.Players.LocalPlayer
local tool = game.ReplicatedStorage.Sword

script.Parent.MouseButton1Down:connect(function()
    if player:FindFirstChild("Backpack") then
        tool:Clone().Parent = player.Backpack
	script.Parent.Text = "" --Make sure to find the gui text here.
    end
end)


4 comments

0

I need it to appear again when the character dies

0

ah nvm thx

0

I found a way through testing thx anyeays

0

Np, let me know if you need any help.

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