|
| 12 Mar 2017 06:11 PM |
script.Parent.MouseButton1Click:connect(function() if script.Parent.Parent.GunValues.M4.Value == true then if script.Parent.Parent.CamoValues.Teal.Value == true then do gun = game.ReplicatedStorage.Gun.TealM4:Clone() gun.Parent = script.Parent.Parent.Parent.Parent.Backpack script.Parent.Visible = false local player = game.Players.LocalPlayer player.Character.Humanoid.TealM4:remove() -------------------regM4 else if script.Parent.Parent.GunValues.M4.Value == true then if script.Parent.Parent.CamoValues.Black.Value == true then do gun = game.ReplicatedStorage.Gun.M4:Clone() gun.Parent = script.Parent.Parent.Parent.Parent.Backpack script.Parent.Visible = false local player = game.Players.LocalPlayer player.Character.Humanoid.M4:remove() end end end end end)
Players.Player1.PlayerGui.Menu.Spawn.LocalScript:10: 'end' expected (to close 'do' at line 3) near 'else' 16:11:01.545 - Unable to load plugin icon. |
|
|
| Report Abuse |
|
|
Fredfishy
|
  |
| Joined: 21 Mar 2009 |
| Total Posts: 4197 |
|
|
| 12 Mar 2017 07:07 PM |
Don't you have a random "do" on this line?
" if script.Parent.Parent.CamoValues.Black.Value == true then do" |
|
|
| Report Abuse |
|
|
|
| 12 Mar 2017 10:56 PM |
| No space between else and if. |
|
|
| Report Abuse |
|
|
|
| 12 Mar 2017 10:58 PM |
"Don't you have a random "do" on this line?"
No. The `do` keyword declares a new scope.
|
|
|
| Report Abuse |
|
|
doggy00
|
  |
| Joined: 11 Jan 2011 |
| Total Posts: 3571 |
|
|
| 12 Mar 2017 11:10 PM |
| I'm kinda lazy right now but try adding 'end' right before the last end? |
|
|
| Report Abuse |
|
|
|
| 12 Mar 2017 11:13 PM |
| The script is so messy. There are even t so ends on the same line. |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Mar 2017 11:14 PM |
Some people prefer that look. I honestly don't understand it.
|
|
|
| Report Abuse |
|
|
doggy00
|
  |
| Joined: 11 Jan 2011 |
| Total Posts: 3571 |
|
|
| 12 Mar 2017 11:15 PM |
| If anything it's sloppy because it has == true in an if then statement but I'm even sloppier than that so I can't really say anything. |
|
|
| Report Abuse |
|
|
|
| 12 Mar 2017 11:17 PM |
That's not even considered sloppy. It's preference in many cases because the performance difference between evaluating the value alone in a condition and comparing the value to true is generally negligible.
|
|
|
| Report Abuse |
|
|
|
| 12 Mar 2017 11:18 PM |
Well my scripts are not sloppy...
Because I have none. Right now I only have a lobby. Well... at least my active game. |
|
|
| Report Abuse |
|
|
| |
|