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

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

Asked by 9 years ago

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

Log in to vote
0
Answered by
FiredDusk 1466 Moderation Voter
9 years ago
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)


0
I need it to appear again when the character dies xShadowNight 20 — 9y
0
ah nvm thx xShadowNight 20 — 9y
0
I found a way through testing thx anyeays xShadowNight 20 — 9y
0
Np, let me know if you need any help. FiredDusk 1466 — 9y
Ad

Answer this question