Hi!
So I’m trying to make a starting screen and I want everything on it to disappear when I press the play button but even with tutorials I still can’t make it go away.
Hi!
So I’m trying to make a starting screen and I want everything on it to disappear when I press the play button but even with tutorials I still can’t make it go away.
Use the MouseButton1Click event and connect that to a function which toggled the enable property of the UI or the visibility property of a frame, button, label, etc.
ok so I tried that and this is what i put but it’s still not working
script.Parent.MouseButton1Click:Connect(function()
StarterGui.ScreenGui.Frame.Visability = 1
end)
You need to find the GUI through the player’s PlayerGui or you could use script.Parent until you reach the frame. Also, the visibility property is a boolean (true or false), not a number.
local Player = game.Players.LocalPlayer
local PlayerGui = Player.PlayerGui
script.Parent.MouseButton1Click:Connect(function()
PlayerGui.ScreenGui.Frame.Visibility = false
end
i’m sorry but where is the player gui i can’t find it all i see is starter gui
It’s in every separate player.
That will be added in the game - everything in StarterGui
replicates to it. It’s the individual GUI for each player.
local player = game:GetService("Players").LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local screenGui = playerGui:WaitForChild("ScreenGui")
local frame = screenGui:WaitForChild("Frame")
script.Parent.MouseButton1Click:Connect(function()
frame.Visible = false
end)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.