function onTouch(Part) wait(1) game.StarterGui.ScreenGui.Frame.Visible = true wait(1) end script.Parent.Touched:connect(onTouch)
This hasn't been tested.
script.Parent.Touched:connect(function(hit) local hitplayer = game.Players:GetPlayerFromCharacter(hit.Parent) -- we must somehow get the player if (hitplayer) then -- if what hit it was a player then local screengui = hitplayer.PlayerGui:FindFirstChild("ScreenGui") -- defining the 'ScreenGui' if (screengui) then -- if there a is 'ScreenGui' then screengui.Frame.Visible = true -- making the frame visible wait (4) screengui.Frame.Visible = false -- making the frame invisible end end end)
Hope it works for ya!
Marked as Duplicate by 1waffle1, Azmidium, and Goulstem
This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.
Why was this question closed?