Exactly what the title says, here's what I tried:
script.Parent (function(hit) game.StarterGui.ScreenGui.GoodJob.Visible = true wait(10) game.StarterGui.ScreenGui.GoodJob.Visible = false end)
local debounce = true script.Parent.Touched:connect(function (hit) --You missed "connect" if not hit.Parent:FindFirstChild("Humanoid") then return end --Check to see if it's a player. if not debounce then return end debounce = false --Debounce prevents the function being called multiple times. game.Players:FindFirstChild(hit.Parent.Name).PlayerGui.ScreenGui.GoodJob.Visible = true --PlayerGui must be edited, NOT ScreenGui. ScreenGui isn't the live GUI. wait(10) game.Players:FindFirstChild(hit.Parent.Name).PlayerGui.ScreenGui.GoodJob.Visible = false debounce = true end)
I'm Aurum, and you're welcome.
The guy above forgot something...
Lemme get this right, if a someone touches a brick, then a GUI pops up?? If so, then copy this:
--PUT THIS IN A LOCALSCRIPT Inside the brick inside the player brick = game.Workspace. --Complete the path to the brick Gui = game.Players.LocalPlayer.PlayerGui --Complete the path to the Gui. time = 10 --Waits 10 seconds before being allowed to be touched again. You can change this. debounce = true --Leave this alone script.Parent.Touched:connect(function(hit) --Aurum forgot the Touched event... if debounce == true then debounce = false if hit.Parent.Name == game.Players.LocalPlayer.Name then Gui.Visible = true end --Ends the second if end --Ends the first if wait(time) debounce = true end)