Vrakner
|
  |
| Joined: 19 Feb 2013 |
| Total Posts: 323 |
|
|
| 31 Jul 2013 03:59 AM |
Script:
function RunCoding(code) clone = ScriptsGroup.zzzGUIDEzzz.RunScript:Clone() --this script runs the code in Source clone.Parent = script clone.Name = "CodeGo" clone["Source"].Value = code clone.Disabled = false return clone --this is what I'm not sure about end
Error:
01:56:03.577 - An error occurred 01:56:03.579 - Script "Players.Player1.PlayerGui.Scripts.GunSwitchingScript.Machin", Line 101 - global RunCoding 01:56:03.582 - Script "Players.Player1.PlayerGui.Scripts.GunSwitchingScript.Machin", Line 251 - global OnFire 01:56:03.584 - Script "Players.Player1.PlayerGui.Scripts.GunSwitchingScript.Machin", Line 414 01:56:03.587 - stack end
What is wrong here? For reference, I'm calling the function with this:
local CoroutinesSk = RunCoding([[ MyPlayer = game.Players.LocalPlayer ScriptsGroup = MyPlayer.PlayerGui.Scripts repeat wait() until ScriptsGroup.ArmsFollowScreen.LeftArmRotation.Value local LAR = ScriptsGroup.ArmsFollowScreen.LeftArmRotation.Value repeat wait() until ScriptsGroup.ArmsFollowScreen.LeftArmPosition.Value local LAP = ScriptsGroup.ArmsFollowScreen.LeftArmPosition.Value repeat wait() until ScriptsGroup.ArmsFollowScreen.RightArmRotation.Value local RAR = ScriptsGroup.ArmsFollowScreen.RightArmRotation.Value repeat wait() until ScriptsGroup.ArmsFollowScreen.RightArmPosition.Value local RAP = ScriptsGroup.ArmsFollowScreen.RightArmPosition.Value for i=1, 3 do wait(FireRate/6) RAP = RAP - Vector3.new(0,0,0.02) end for i=1, 3 do wait(FireRate/6) RAP = RAP + Vector3.new(0,0,0.02) end script:Destroy() --haha ]]) |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 31 Jul 2013 04:22 AM |
| you can't access Source property |
|
|
| Report Abuse |
|
|
Vrakner
|
  |
| Joined: 19 Feb 2013 |
| Total Posts: 323 |
|
|
| 31 Jul 2013 04:40 PM |
| Source is a stringvalue in the clone. |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 31 Jul 2013 04:44 PM |
| RBX.Lua checks members before children; rename Source |
|
|
| Report Abuse |
|
|
Vrakner
|
  |
| Joined: 19 Feb 2013 |
| Total Posts: 323 |
|
|
| 31 Jul 2013 08:17 PM |
Got it, thanks.
Stupid ROBLOX wiki... |
|
|
| Report Abuse |
|
|