I want to make it that, upon click of a computer, text will appear (as an interaction.) I currently have a script but it doesn't seem to work at all. Any guidance?
function onClicked() game.Players.LocalPlayer.PlayerScripts.ComputerText.Visible = true wait(3) game.Players.LocalPlayer.PlayerScripts.ComputerText.Visible = false end script.Parent.ClickDetector.MouseClick:connect(onClicked)
ComputerText is the name of the Frame that the text is held within.
I'm assuming you're trying to access the PlayerGui
since you're using the property Visible
.
script.Parent.ClickDetector.MouseClick:Connect(function(player) --Get the player who clicked local Gui = player.PlayerGui:WaitForChild("ScreenGui") --Whatever the GUI is called Gui.ComputerText.Visible = true end)
Please accept my answer if this helped!