Hey guys! I’m pretty new to scripting, and I’m just getting started! I looked at some youtube tutorials and created this UI script where if I click it, It says “clicked lol” But nothing prints in the output
Please help me! Here are some screen shots!
StartGui is just a placeholder for Gui. Refer to the script below for proper way to be checking on a player’s Gui.
The Guis players see and interact with are stored in a PlayerGui folder inside their Player Instance.
local plr = game.Players.LocalPlayer
local textButton = plr.PlayerGui:WaitForChild("ScreenGui"):WaitForChild("TextButton")
TextButton.MouseButton1Up:Connect(function()
print("Clicked lol")
end)
2 Likes