|
| 15 May 2016 07:50 PM |
Yes, I am an amateur scripter, and post here all the time because I know jack in debugging.
I am working with GUIs ATM and cannot figure out why,
local NewGame = require(game.ServerScriptService.Title:WaitForChild("New"))
keeps breaking my script, and will not display any errors. The script works fine, except when this is in there..and I do not know why.
Any help is exceptional! |
|
|
| Report Abuse |
|
igunaa
|
  |
| Joined: 15 Sep 2010 |
| Total Posts: 2588 |
|
|
| 15 May 2016 07:53 PM |
Are you using a ModularScript?
Said the wise. |
|
|
| Report Abuse |
|
|
| 15 May 2016 07:56 PM |
Yes.
Code: (In ModuleScript)
local NewGame = {} local Player = game.Players.LocalPlayer
local Continue = Player.PlayerGui.Title.Background:WaitForChild("Continue") local New = Player.PlayerGui.Title.Background:WaitForChild("New") local Info = Player.PlayerGui.Title.Background:WaitForChild("Info") local Credits = Player.PlayerGui.Title.Background:WaitForChild("Credits")
local B1 = Player.PlayerGui:WaitForChild("Check").Background:WaitForChild("Background1") local Check = B1.Check local Accept = B1.Accept local Cancel = B1.Cancel
function NewGame.Verify() Continue:TweenPosition(UDim2.new(.45, 0, -1, 0), "In", "Quint", 2) wait(.1) New:TweenPosition(UDim2.new(.45, 0, -1, 0), "In", "Quint", 2.25) wait(.1) Info:TweenPosition(UDim2.new(.45, 0, -1, 0), "In", "Quint", 2.5) wait(.1) Credits:TweenPosition(UDim2.new(.45, 0, -1, 0), "In", "Quint", 2.75) wait(3) B1.Visible = true for i = 1, .7, -0.01 do B1.BackgroundTransparency = i wait() end wait(.2) for i = 1, 0, -0.03 do Check.TextTransparency = i wait() end Accept:TweenPosition(UDim2.new(.2, 0, .6, 0), "Out", "Quad", 2) Cancel:TweenPosition(UDim2.new(.6, 0, .6, 0), "Out", "Quad", 2) end
return NewGame |
|
|
| Report Abuse |
|
igunaa
|
  |
| Joined: 15 Sep 2010 |
| Total Posts: 2588 |
|
|
| 15 May 2016 08:10 PM |
http://wiki.roblox.com/index.php?title=Function_dump/Functions_specific_to_ROBLOX#require
I`ve never gotten into require, but seen the example in the wiki it should lead to a ModuleScript, I`d :waitforchild before then require it separetedly.
Said the wise. |
|
|
| Report Abuse |
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 15 May 2016 08:15 PM |
| Either the "game.ServerScriptService.Title:WaitForChild("New")" is yielding forever or the module is. |
|
|
| Report Abuse |
|
|
| 17 May 2016 07:01 AM |
| Ok, but how do I fix that? lol |
|
|
| Report Abuse |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 17 May 2016 08:03 AM |
| Help out here in Scripters to get more experience debugging ^_^ |
|
|
| Report Abuse |
|