14095653
|
  |
| Joined: 01 Aug 2014 |
| Total Posts: 179 |
|
|
| 25 Aug 2014 10:16 AM |
I have a script that lets a player click a Text Button, which makes the Frame visible, and it makes two Text Buttons, which are children of the Frame. If you choose the Solo one it teleports you to the Story Base, and if you choose The Multiplayer one it teleports you to the baseplate. The problem is line 34, which is a simple end). Here's the script:
local PG = script.Parent local F = script.Frame
F.Visible = false PG.Visible = true PG.MouseButton1Click:connect(function() PG.MouseButton1Click:connect(Function) PG.Text = "Loading StartGui..." wait(5) print("StartGui Loaded!") PG.Text = "StartGui is loaded!" wait(2) F.Visible = true PG.Visible = false end) F.BackgroundColor3 = UDim2.new(0,0,87) Instance.new("TextButton").Parent = F Instance.new("TextButton").Parent = F SS = script.F:findFirstChild() SS.Text = "Play Solo(Story)" M = script.F:findSecondChild() M.Text = "Play Multiplayer Mode" SS.MouseButton1Down:connect(function() SS.MouseButton1Down:connect(Function) SS.Text = "Play by yourself in this story mode. Basically a training session for noobs." SS.MouseButton1Click:connect(function() SS.MouseButton1Click:connect(Function) SS.Text = "Loading Story..." wait(10) print("Story Loaded!") SS.Text = "Story is loaded. Will take you there." wait(2) local teleportLocalPlayer("StoryBase") end) -- Here is the error. end) M.MouseButton1Down:connect(function() M.MouseButton1Down:connect(Function) M.Text = "Play with others in this multiplayer mode." M.MouseButton1Click:connect(function() M.MouseButton1Click:connect(Function) M.Text = "Loading multiplayer mode..." wait(10) print("Multiplayer Loaded!") M.Text = "Multiplayer loaded. Will take you there." wait(2) local teleportLocalPlayer("Baseplate") end) end)
I know, it's kind of sloppy. Please help! |
|
|
| Report Abuse |
|
|
14095653
|
  |
| Joined: 01 Aug 2014 |
| Total Posts: 179 |
|
| |
|
plistra
|
  |
| Joined: 12 Mar 2014 |
| Total Posts: 859 |
|
|
| 25 Aug 2014 02:00 PM |
| try changing an "end)" to end, and switch "Function" to function a little higher. if doing "end" doesn't work, just try deleting it. |
|
|
| Report Abuse |
|
|
14095653
|
  |
| Joined: 01 Aug 2014 |
| Total Posts: 179 |
|
|
| 26 Aug 2014 04:17 PM |
| What do you mean function a little higher? |
|
|
| Report Abuse |
|
|
plistra
|
  |
| Joined: 12 Mar 2014 |
| Total Posts: 859 |
|
|
| 27 Aug 2014 11:30 AM |
PG.MouseButton1Click:connect(Function)
unless you defined "Function", this wont run. |
|
|
| Report Abuse |
|
|
plistra
|
  |
| Joined: 12 Mar 2014 |
| Total Posts: 859 |
|
|
| 27 Aug 2014 11:32 AM |
local PG = script.Parent local F = script.Frame
F.Visible = false PG.Visible = true PG.MouseButton1Click:connect(function() PG.MouseButton1Click:connect(function) --whats the point of this? PG.Text = "Loading StartGui..." wait(5) print("StartGui Loaded!") PG.Text = "StartGui is loaded!" wait(2) F.Visible = true PG.Visible = false end) F.BackgroundColor3 = UDim2.new(0,0,87) Instance.new("TextButton").Parent = F Instance.new("TextButton").Parent = F SS = script.F:findFirstChild() SS.Text = "Play Solo(Story)" M = script.F:findSecondChild() M.Text = "Play Multiplayer Mode" SS.MouseButton1Down:connect(function() SS.MouseButton1Down:connect(Function) SS.Text = "Play by yourself in this story mode. Basically a training session for noobs." SS.MouseButton1Click:connect(function() SS.MouseButton1Click:connect(Function) SS.Text = "Loading Story..." wait(10) print("Story Loaded!") SS.Text = "Story is loaded. Will take you there." wait(2) local teleportLocalPlayer("StoryBase") end) M.MouseButton1Down:connect(function() M.MouseButton1Down:connect(Function) M.Text = "Play with others in this multiplayer mode." M.MouseButton1Click:connect(function() M.MouseButton1Click:connect(Function) M.Text = "Loading multiplayer mode..." wait(10) print("Multiplayer Loaded!") M.Text = "Multiplayer loaded. Will take you there." wait(2) local teleportLocalPlayer("Baseplate") end) end)
I don't know. This script is kinda really ugly. |
|
|
| Report Abuse |
|
|
14095653
|
  |
| Joined: 01 Aug 2014 |
| Total Posts: 179 |
|
|
| 29 Aug 2014 03:37 PM |
MouseButton1Click:connect(function() lets the player click it I've read on ROBLOX Wiki that MouseButton1Click:connect(Function) makes the computer check if the player click. |
|
|
| Report Abuse |
|
|