Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

My friend's main Menu Script Help him please?

Asked by 9 years ago

He made a MainMenu GUI and is trying to make it so when the player Presses PLAY it basically Transparences to 1.

Player = game.Players.LocalPlayer
Menu = script.Parent
Play = Menu.Play
About = Menu.About
HasPressedPlay = false

function MouseEnterPlayButton()
    Play.FontSize = "Size48"
    Play.BackgroundColor3 = Color3.new(108, 135, 255)
    Play.Size = UDim2.new(200, 0, 50, 0)
end

function MouseLeftPlayButton()
    Play.FontSize = "Size48" ---INFO
    Play.BackgroundColor3 = Color3.new(108, 135, 255)
    Play.Size = UDim2.new(200, 0, 50, 0)
end

function MouseEnterAboutButton()
    About.FontSize = "Size48"
    About.BackgroundColor3 = Color3.new(108, 135, 255)
    About.Size = UDim2.new(200, 0, 50, 0)
end

function MouseLeftAboutButton()
    About.FontSize = "Size48" --- INFO
    About.BackgroundColor3 = Color3.new(108, 135, 255)
    About.Size = UDim2.new(200, 0, 50, 0)
end

function PlayGame()
    if HasPressedPlay == false then
        for GuiMove = 1, 30 do
            if GuiMove <= 20 then
                Play.Position = Play.Positiom + UDim2(0.05, 0, 0, 0)
            end         
            if GUIMove >= 10 then
                About.Position =Play.Position == UDim2(0.05, 0, 0, 0)   -- You made a small error here.
            end
            Wait()
        end

        Menu:remove()
    end
end
About.MouseLeave:connect(MouseLeftPlayButton)
About.MouseEnter:connect(MouseEnterPlayButton)
Play.MouseLeave:connect(MouseLeftPlayButton)
Play.MouseEnter:connect(MouseEnterPlayButton)
Play.MouseButton1Down:connect(PlayGame)
0
There are too many functions,thats why. woodengop 1134 — 9y
0
@TheContinentofEurope There aren't too many functions. Color3 Values should always be divided by 255. Example: Play.BackgroundColor3 = Color3.new(108/255, 135/255, 255/255) Validark 1580 — 9y
0
On line 38, you actually noted out the error... DigitalVeer 1473 — 9y
0
No I noted myf riends error true but It still dont work 789zaya 0 — 9y
View all comments (2 more)
0
Did you try to fix the error? DigitalVeer 1473 — 9y
0
In 38, as pointed out, the script can't set and read a value at the same time. I think it is supposed to be "+ UDim2.new". This brings me to my next point in that when specifying a UDim2 value, it must be "UDim2.new". Another typo in line 37: you used GUIMove vs. GuiMove, Capitalization makes a difference. SanityMan 239 — 9y

Answer this question