Hello! I have made an Easter Egg in my place and I made a Gui that will pop up when the brick is touched, saying: You found an Easter Egg, The SkyHook! the Gui is in my starterGui called EggGui. It will pop up and play the victory sound but after I reset and go to the Brick and it doesn't pop up again. any way it can happen more than once?
here is the script:
function onTouched(hit)
game.Players.LocalPlayer.PlayerGui.EggGui.Frame.Visible = true
game.Players.LocalPlayer.PlayerGui.EggGui.Sound:Play()
wait(2)
game.Players.LocalPlayer.PlayerGui.EggGui.Frame.Visible = false
end
connection = script.Parent.Touched:connect(onTouched)

6 comments
this worked but I have a problem; It doesn't work in the actual game! it works in studio though. Any help?
I edited my answer
Changing it to a LocalScript broke it all together! But there isn't anything in my output!
You don't change it to a LocalScript! You use something else besides LocalPlayer, like game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui.
Yahoo!! It worked!!! Thank you! I guess I misread you the first time! Thanks again!
Your welcome