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

Why when i equip the tool the gui is not visible?

Asked by
MpAlex 16
4 years ago
Edited 4 years ago

when i equip the tool, the gui is not opening

01local tool = script.Parent
02function echipat()
03    local menu = tool.Menu
04    local setaribg = menu.SetariBackground
05    local csetaribg = setaribg:Clone()
06    csetaribg.Parent = game.Players.LocalPlayer.PlayerGui
07    if csetaribg.Visible == false then
08        csetaribg.Visible = true
09        print("open")
10    end
11end
12 
13function dezechipat()
14    local csetaribg = game.Player.LocalPlayer:WaitForChild("Menu")
15    if csetaribg.Visible == true then
View all 22 lines...

also, the print is not showing in the console. i'm missing something?

i want the gui to open when i equip the tool and close when i unequip the tool edit: changed the code, same problem

0
Try to put tool equipped in the end of a script GravityGouse99938 75 — 4y
0
Try to put tool equipped in the end of a script GravityGouse99938 75 — 4y
0
i tried and is the same thing MpAlex 16 — 4y
0
Make sure your script is a Local Script. Secondly make sure you manipulate the Player's PlayerGui, not the StarterGui. The problem is that StarterGui replicates EVERYTHING inside to the PlayerGui. So that is where you'll find your Gui. Dovydas1118 1495 — 4y
0
i don't know if i'm doing it right, i'm a begginer, so this is the code MpAlex 16 — 4y

Answer this question