I have attempted to script an onTouch function of sorts that SHOULD make certain text labels in the GUI be visible at certain times. This does not seem to be working. I do not see any errors in the output or developer console, so I have no idea what is wrong with it.
local gui1 = game.StarterGui.Gui1.Frame
function doSomethingOnTouch(part)
local h = part.Parent:FindFirstChild("Humanoid")
if h ~= nil then
gui1.label1.Visible = true
wait(3)
gui1.label1.Visible = false
wait()
gui1.label2.Visible = true
wait(3)
gui1.label2.Visible = false
end
end
script.Parent.Touched:connect(doSomethingOnTouch)

2 comments
easy fix. You need to change the players gui not that gui.
I made a typo, sorry. It should work now!