new to roblox studio need some help with this script
local screengui = game.StarterGui.ScreenGui
script.Parent.MouseButton1Click:Connect(function() local allchildren = screengui:GetChildren()
local numofchild = #allchildren for i = 1, numofchild do local child = allchildren[i] child.visible = false end
end)
It Should Look Like This
script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.Enabled = false end)
The Script Above Only Does Local For Global Do
script.Parent.MouseButton1Click:Connect(function() game.StarterGui.ScreenGui.Enabled = false end)
Local Is For One Player For Example ChadCoolGuy123 Presses The Button But You Don't It Only Goes Away For Him But Global Is For Everyone For Example ChadCoolGuy123 Presses The Button But You Didn't It Goes Away For Both