Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Script not working?

Player = game.Players.LocalPlayer
Menu = Script.Parent
Start = Menu.Start
About = Menu.About
ContactUs = Menu.ContactUs
HasPressedStart = false
function MouseEnterStartButton()
	Start.Fontsize = "Size48"
	Start.BackgroundColor3 = Color3.new(0.1, 0.67, 0.71)
	Start.Size = UDim2.new(0, 0, 0, 0)
end

function MouseLeftStartButton()
	Start.Fontsize = "Size48"
	Start.BackgroundColor3 = Color3.new(0.1, 0.67, 0.71)
	Start.Size = UDim2.new(0, 0, 0, 0)
end --Start Button Script

function MouseEnterAboutButton()
	About.Fontsize = "Size48"
	About.BackgroundColor3 = Color3.new(0.1, 0.67, 0.71)
	About.Size = UDim2.new(0, 0, 0, 0)
end

function MouseLeftAboutButton()
	About.Fontsize = "Size48"
	About.BackgroundColor3 = Color3.new(0.1, 0.67, 0.71)
	About.Size = UDim2.new(0, 0, 0, 0)
end --About Button Script

function MouseEnterContactUsButton()
	ContactUs.Fontsize = "Size48"
	ContactUs.BackgroundColor3 = Color3.new(0.1, 0.67, 0.71)
	ContactUs.Size = UDim2.new(0, 0, 0, 0)
end

function MouseLeftAboutButton()
	ContactUs.Fontsize = "Size48"
	ContactUs.BackgroundColor3 = Color3.new(0.1, 0.67, 0.71)
	ContactUs.Size = UDim2.new(0, 0, 0, 0)
end --Contact Us Button Script

function PlayGame()
	if HasPressedPlay == false then
	for GuiMove = 1, 20  do
	   Start.Position =UDim2.new(0, 0, 0, 0)
	   if GuiMove >= 10 then
	    About.Position = UDim2.new(0, 0, 0, 0)
	    if GuiMove >= 10 then
	   ContactUs.Position = UDim2.new (0, 0, 0, 0)
	end
	   wait()
	end
	for GuiMove = 1, 20  do
	   Start.Position =UDim2.new(0, 0, 0, 0)
	   if GuiMove >= 10 then
	    About.Position = UDim2.new(0, 0, 0, 0)
	    if GuiMove >= 10 then
	   ContactUs.Position = UDim2.new (0, 0, 0, 0)
	end
	   wait()
	end	   
	
	  Menu:remove()
	end	
end

Start.MouseLeave:connect(MouseLeftStartButton)
Start.MouseEnter:connect(MouseEnterStartButton)
About.MouseLeave:connect(MouseLeftStartButton)
About.MouseEnter:connect(MouseEnterStartButton)
ContactUs.MouseLeave:connect(MouseLeftStartButton)
ContactUs.MouseEnter:connect(MouseEnterStartButton)
Start.MouseButton1Down:connect(StartGame)

This is my GUI script and when I click on the start button GUI it should close all the GUI''s. The output says: 09:17:16.632 - Players.Player1.PlayerGui.StartMenu.LocalScript:75: 'end' expected (to close 'if' at line 44) near ''

1 answer

We can't figure out how to fix it, unless you put the output's details down. We're sorry.

2 comments

0

09:17:16.632 - Players.Player1.PlayerGui.StartMenu.LocalScript:75: 'end' expected (to close 'if' at line 44) near ''

0

that means you forgot to 'end' a 'if' command.

This discussion is preserved as it was. New answers, comments, and votes are closed.