New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
0

# Scrip in StarterGUI isnt working?

so this is a script inside a frame that's inside a GUI and that GUI is inside a StarterGUI. The script makes it so if you touch one part, a GUI appears, but if you touch another part then the GUI disappears (or at least the text) The 1st part of the script works, but the 2nd part doesn't. any help?

local Part = workspace:FindFirstChild("Why")

Part.Touched:Connect(function(PartThatTouchedThePart)

wait(1)

script.Parent.Text.TextTransparency = 0

script.Parent.Text2.TextTransparency = 0

end)

local Part = workspace:FindFirstChild("PIZZA")

Part.Touched:Connect(function(PartThatTouchedThePart)

wait(1)

script.Parent.Text.TextTransparency = 1

script.Parent.Text2.TextTransparency = 1

print("NYEAH!")

end)


1
Edited 6 months ago

you only tell the script to make the text invisible, instead of doing that you should make the gui invisible(the text will be invisible too) by typing the following

local Part = workspace:FindFirstChild("Why")

Part.Touched:Connect(function(hit)
if hit:FindFirstChild("Humanoid") then--this will see if u have touched the part

wait(1)

script.Parent.Parent.Enabled= false--this will make the gui invisible and not active
end

end)

local Part = workspace:FindFirstChild("PIZZA")

Part.Touched:Connect(function(hit)
if hit:FindFirstChild("Humanoid") then

wait(1)

script.Parent.Parent.Enabled= true--this will make the gui visible and active

print("NYEAH!")
end

end)

0
tried it out and it worked! thanks! Adenandpuppy 50 — 6mo