Hello! I am a new scripter encountering a problem. My problem is that this image button is not doing what its supposed to do. I am making a thing where if u stand on this platform, it opens up this shop (sorta like the simulator shops), although X button to close out of the shop is not working. Can someone help me? Here is the script.
game.workspace.Shop.Touched:Connect(function(partThatTouchedIt) game.StarterGui.ScreenGui.CloseButton.Visible = true local cam = workspace.CurrentCamera local FocusPart = game.Workspace.FocusPart cam.CameraType = "Fixed" cam.Focus = FocusPart.CFrame end)
Just like you did here game.StarterGui.ScreenGui.CloseButton.Visible = true
do it again but when the player clicks the X. For example,
CloseButton.MouseButton1Down:Connect(function() game.StarterGui.ScreenGui.Visible == false end
Just like that, obviously place the script in the correct place and change the names up and stuff like that, but that's how you do it. You're welcome!