generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Local Script...

Previous Thread :: Next Thread 
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 03:36 PM
For some reason it won't work.
Player = game.Players.LocalPlayer
Menu = script.Parent
Play = Menu.Play
HasPressedPlay = false

function MouseEnterPlayButton()
Play.FontSize = "Size 36"
Play.BackgroundColor3 = Color.New (0.1, 0.67, 0.7)
Play.Size = Udim2.new (0.45, 0, 0.225, 0)
end

function MouseLeftPlayerButton()
Play.FontSize = "Size 24"
Play.BackgroundColor3 = Color.New (0.54, 0.62, 0.7)
Play.Size = Udim2.new (0.3, 0, 0.15, 0)
end

function PlayGame()
if HasPressedPlay == false then
for GuiMove = 1, 30 do
if GuiMove >=20 then
Play.Position = Play.Position +Udim2.new (0.05, 0, 0, 0)
end
if Gui >=10 then
Play.Position = Play.Position +Udim2.new (0.05, 0, 0, 0)
end
wait()
end
Menu: remove()
end
end

Play.MouseLeave:connect (MouseLeftPlayerButton)
Play.MouseEnter:connect (MouseEnterPlayButoon)
Play.MouseButton1Down:connect (PlayGame)

It's a script for the gui.
What it should do is when I click on the Play Button the My Gui should slide away and disappear. However it doesn't work at all.
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 03:42 PM
Anyone?
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 03:47 PM
can some one at least tell me if it's me or the game that doesn't work?
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 03:53 PM
HElp! HELP!
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
06 Aug 2014 03:54 PM
Color3.new
UDim2.new
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 03:58 PM
Still doesn't work.
Here is the link. http://www.roblox.com/Guis-place?id=170540554
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 04:11 PM
anyone?
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 04:28 PM
Guys Come on I am about to go crazy with this.
Report Abuse
IBlockMasterI is not online. IBlockMasterI
Joined: 11 Apr 2010
Total Posts: 293
06 Aug 2014 04:50 PM
Is there an error message or just no result?
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
06 Aug 2014 04:54 PM
Maybe place it on a localscript. If it is on a localscript place it on a script. Also, placing local scripts on workspace will not make that localscript work.
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 05:11 PM
What happens is that I the output it doesn't say anything no errors nothing what so ever.
When I try to do it in the studio it doesn't work the way it is intended.
When I try going inside a game (Play Mode) It still doesn't work. I posted a link to the game so you can see.
And no my Local Script in not in the Workspace it's in the Gui.
The reason I went with Local script is to avoid any bugs (to make it simple)
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 05:22 PM
bomp
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 05:40 PM
bimp
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 06:05 PM
bamp
Report Abuse
ungh01 is not online. ungh01
Joined: 24 Dec 2008
Total Posts: 876
06 Aug 2014 06:07 PM
Quit bumping, I'll test out the script for you brb
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 06:09 PM
Well I have to bump so that someone can maybe help me and ok thx.
Report Abuse
ungh01 is not online. ungh01
Joined: 24 Dec 2008
Total Posts: 876
06 Aug 2014 06:13 PM
I fixed it in Solo Mode.
There were tons of errors, I fixed them USING the OUTPUT.
Output box is there for a reason :)

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

function MouseEnterPlayButton()
Play.FontSize = "Size36"--Was Size 36
Play.BackgroundColor3 = Color3.new (0.1, 0.67, 0.7)--Color3.new not Color.New
Play.Size = UDim2.new (0.45, 0, 0.225, 0)
end

function MouseLeftPlayerButton()
Play.FontSize = "Size24"--Was Size 24
Play.BackgroundColor3 = Color3.new (0.54, 0.62, 0.7)--Color3.new not Color.New
Play.Size = UDim2.new (0.3, 0, 0.15, 0)
end

function PlayGame()
if HasPressedPlay == false then
for GuiMove = 1, 30 do
if GuiMove >=20 then
Play.Position = Play.Position +UDim2.new (0.05, 0, 0, 0)
end
if GuiMove >=10 then--Was Gui not GuiMove
Play.Position = Play.Position +UDim2.new (0.05, 0, 0, 0)
end
wait()
end
Menu:Destroy()
end
end

Play.MouseLeave:connect (MouseLeftPlayerButton)
Play.MouseEnter:connect (MouseEnterPlayButton)--Mispelled
Play.MouseButton1Down:connect (PlayGame)
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 06:18 PM
Ok thanks I'l try that
Report Abuse
ungh01 is not online. ungh01
Joined: 24 Dec 2008
Total Posts: 876
06 Aug 2014 06:19 PM
Also be sure to do this:

function PlayGame()
if HasPressedPlay == false then
HasPressedPlay = true
for GuiMove = 1, 30 do
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 06:24 PM
It worked!
Thanks allot!
Lol I made allot of errors guess I am sleepy today.
Report Abuse
ungh01 is not online. ungh01
Joined: 24 Dec 2008
Total Posts: 876
06 Aug 2014 06:24 PM
No problem glad to help :)
Report Abuse
Mykola488 is not online. Mykola488
Joined: 29 Nov 2012
Total Posts: 177
06 Aug 2014 06:28 PM
:)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image