I am making a game and in part of it, you press a button on the screen and an image shows up. How can I script the button so when you click it the image pops up?
local script in the button
local thingthatappears = location of the image that will appear script.Parent.MouseButton1Click:Connect(function() if thingthatappears.Visible == false then thingthatappears.Visible = true end end)
make sure thingthatappears.Visible = false before the script runs. This is only the most basic way to use guis. You can use things like TweenService to your liking. Looks complicated, but once you learn it, you look like a pro. Really recommend checking it out.
https://developer.roblox.com/en-us/api-reference/function/GuiObject/TweenPosition
Closed as Not Constructive by ScuffedAI, User#32819, Nguyenlegiahung, PrismaticFruits, JakyeRU, and User#5423
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?