local plr = game.Players.LocalPlayer
local HammerGuiFake = plr.PlayerGui:WaitForChild("HammerGui")
local HammerGuiReal = HammerGuiFake:WaitForChild("FullHammerGui")
if script.Parent.Equipped
then
HammerGuiReal.Visible = true
end
✓ ANSWER ACCEPTED
Why when I join the gui that is visible only when tool is out is visible when I join?
1 answer
✓ Accepted answer
local plr = game.Players.LocalPlayer
local HammerGuiFake = plr.PlayerGui:WaitForChild("HammerGui")
local HammerGuiReal = HammerGuiFake:WaitForChild("FullHammerGui")
local function onChanged()
if script.Parent.Equipped then
HammerGuiReal.Visible = true
else
HammerGuiReal.Visible = false
end
end
script.Parent:GetPropertyChangedSignal("Equipped"):Connect(onChanged)
2 comments
0
Error " Equipped is not a valid property name."
0
Nevermind thanks!
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Your question isn't grammatically correct, but it's because on line 3, you added an if statement. The if statement checks to see wether you've eqquiped a tool. This event only fires once because there's no loop.
would while true do work