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

How do you clone a GUI once on equip but still enable/disable it on equip and unequip?

Asked by
1uqt 2
1 year ago

I'm trying to make a tool that allows you to insert models into a game. I want the GUI to enable/disable on equip or unequip instead of destroying it as it allows you to save the text you already typed into it.

local tool = script.Parent
tool.Equipped:Connect(function(plr)
    print("equipped")
    game.Players.LocalPlayer.PlayerGui:WaitForChild("ModelInsertingGui").Enabled = true
end)

tool.Unequipped:Connect(function(plr)
    print("unequipped")
    game.Players.LocalPlayer.PlayerGui:WaitForChild("ModelInsertingGui").Enabled = false
end)

1 answer

Log in to vote
0
Answered by 1 year ago

I would just make the gui transparency = 1 when unequipped and then when you equip it make the gui transparency = 0

0
But people could still use it even though it’s invisible. But I first need to find a way to clone it first 1uqt 2 — 1y
0
oh iamnotcool235_s 27 — 1y
Ad

Answer this question