Hey reader! I’m trying to make it so that when the player touches a part something like this will appear on the screen for about 5 seconds
If you know how to make something like this, please let me know!
Hey reader! I’m trying to make it so that when the player touches a part something like this will appear on the screen for about 5 seconds
put this in startergui***
local Player = game.Players.LocalPlayer
local function OnTouch()
Player.PlayerGui:FindFirstChild("GuiNameHere").Enabled = true -- change both names to ur gui name
wait(5)
Player.PlayerGui:FindFirstChild("GuiNameHere").Enabled = false
end
game.Workspace:FindFirstChild("PartNameHere").Touched:Connect(OnTouch) -- make sure its in workspace or edit it
Thanks a ton! This will make the player more immersed! Thanks again!
Sorry I’m a late but you can actually save time if you instantly connect the function like this:***
local Player = game.Players.LocalPlayer
game.Workspace:FindFirstChild(“Part”):Connect(function(OnTouch)
Player.PlayerGui:FindFirstChild("GuiNameHere").Enabled = true -- change both names to ur gui name
wait(5)
Player.PlayerGui:FindFirstChild("GuiNameHere").Enabled = false
end)