thea96
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 37634 |
|
|
| 22 Aug 2014 11:17 AM |
instead of adding wait(.2) which wARC did I want something more reliable |
|
|
| Report Abuse |
|
|
webspace
|
  |
| Joined: 25 Nov 2008 |
| Total Posts: 119892 |
|
| |
|
Inversus
|
  |
| Joined: 30 Jul 2010 |
| Total Posts: 18551 |
|
|
| 22 Aug 2014 11:18 AM |
oh I thought you meant you got bored waiting for your character to load ingame and I had a witty comment which I was going to post which was "look up new computers" but now it's irrelevant so nvm |
|
|
| Report Abuse |
|
|
thea96
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 37634 |
|
|
| 22 Aug 2014 11:20 AM |
I have this
local plr=game.Players.LocalPlayer local chr=plr.Character
it starts running when character isnt in workspace yet so it messes up
i could add a wait(.2) or something but that .2 seconds is just a guess of how long it will take |
|
|
| Report Abuse |
|
|
Asporto
|
  |
| Joined: 16 Aug 2014 |
| Total Posts: 1654 |
|
| |
|
thea96
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 37634 |
|
|
| 22 Aug 2014 11:23 AM |
| yeah im trying characteradded right now |
|
|
| Report Abuse |
|
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
|
| 22 Aug 2014 11:23 AM |
| local Character = workspace:WaitForChild(Player.Name) |
|
|
| Report Abuse |
|
|
thea96
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 37634 |
|
|
| 22 Aug 2014 11:24 AM |
nvm i got it to work just put a waitforchild for some gui because usually gui loads around the same time as character |
|
|
| Report Abuse |
|
|
Gentaurg
|
  |
| Joined: 19 Mar 2011 |
| Total Posts: 8648 |
|
|
| 22 Aug 2014 11:24 AM |
Load.Function:()_Ex-DeltafunctionBB5 ___:ExCmdB1 Print ("Systems Running. Loading... [============XXO(")#(!82310938030891] :SYSTEM ERROR:(PRINT "ERROR") If_Sys.Error="1/0" then Sys.Error= Math.Error If Sys.Error=Math.Error then "Commit Self Killing"____Sys.Ex Else Wait (0.2) PrimalEnd End |
|
|
| Report Abuse |
|
|
thea96
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 37634 |
|
|
| 22 Aug 2014 11:25 AM |
oh i didnt think of that bohdan.. that makes things much better |
|
|
| Report Abuse |
|
|
Unclear
|
  |
| Joined: 27 Aug 2011 |
| Total Posts: 17060 |
|
|
| 22 Aug 2014 11:25 AM |
local character = player.CharacterAdded:wait()
OR
local character = workspace:WaitForChild(player.Name)
OR
local character while character == nil do game:GetService("RunService").RenderStepped:wait() character = player.Character end
I use the second one.
~~ tu tu tu tu tu tu ru ♪♪ |
|
|
| Report Abuse |
|
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
|
| 22 Aug 2014 11:27 AM |
I wouldn't use the first since the character could somehow appear before the script ran. @Unclear |
|
|
| Report Abuse |
|
|
thea96
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 37634 |
|
|
| 22 Aug 2014 11:28 AM |
local plr=game.Players.LocalPlayer local pgui=plr:WaitForChild("PlayerGui") local debris=game:GetService("Debris") local chr=workspace:WaitForChild(plr.Name) torso = chr:WaitForChild("Torso")
works great now wARC doesnt glitch as much |
|
|
| Report Abuse |
|
|
Unclear
|
  |
| Joined: 27 Aug 2011 |
| Total Posts: 17060 |
|
|
| 22 Aug 2014 11:28 AM |
@bohdan
well i wouldnt use the one we use and would use the while loop instead because what if the character's name ~= the player's name o.O
~~ tu tu tu tu tu tu ru ♪♪ |
|
|
| Report Abuse |
|
|
Asporto
|
  |
| Joined: 16 Aug 2014 |
| Total Posts: 1654 |
|
| |
|
Clerical
|
  |
| Joined: 18 Dec 2012 |
| Total Posts: 11724 |
|
|
| 22 Aug 2014 11:29 AM |
| my brain is overheating... |
|
|
| Report Abuse |
|
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
|
| 22 Aug 2014 11:29 AM |
@Unclear why wouldn't the characters name not equal the player name when it first becomes created? O_O
|
|
|
| Report Abuse |
|
|
Cirvius
|
  |
| Joined: 12 Jul 2011 |
| Total Posts: 18817 |
|
| |
|
thea96
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 37634 |
|
|
| 22 Aug 2014 11:29 AM |
>>what if the character's name ~= the player's name o.O
wot |
|
|
| Report Abuse |
|
|
Unclear
|
  |
| Joined: 27 Aug 2011 |
| Total Posts: 17060 |
|
|
| 22 Aug 2014 11:30 AM |
@bohdan
what if the character (like you posed in your hypothetical) was already loaded before the script and its name was changed o.O
~~ tu tu tu tu tu tu ru ♪♪ |
|
|
| Report Abuse |
|
|
Asporto
|
  |
| Joined: 16 Aug 2014 |
| Total Posts: 1654 |
|
| |
|
Gentaurg
|
  |
| Joined: 19 Mar 2011 |
| Total Posts: 8648 |
|
|
| 22 Aug 2014 11:30 AM |
| I didn't speak I typed but I guess you are correct in this context. |
|
|
| Report Abuse |
|
|
thea96
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 37634 |
|
|
| 22 Aug 2014 11:31 AM |
| this is a gun script not black magic name changin stuff |
|
|
| Report Abuse |
|
|
Asporto
|
  |
| Joined: 16 Aug 2014 |
| Total Posts: 1654 |
|
| |
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
|
| 22 Aug 2014 11:31 AM |
O_o
....or maybe the developer of the game should just know how his thing works and do what he wants... |
|
|
| Report Abuse |
|
|