ZizZazZuz
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 2743 |
|
|
| 17 Oct 2011 04:34 PM |
... 'Cause it get's to see all my fails. OK, here's what happens. It goes completely reflecty. Then it doesn't go back to normal. I get off, and the game crashes. Why?
enabled1 = true enabled2 = true
function oT(part) if not enabled1 then return end enabled1 = false if part.Parent:findFirstChild("Humanoid") ~= nil then teamChanging = true player = game.Players:getPlayerFromCharacter(part.Parent) repeat if teamChanging == true then wait(0.25) script.Parent.Reflectance = script.Parent.Reflectance + 0.1 end until script.Parent.Reflectance == 1 script.Parent.BrickColor = player.TeamColor repeat if teamChanging == true then wait(0.25) script.Parent.Reflectance = script.Parent.Reflectance - 0.1 end until script.Parent.Reflectance == 0 script.Parent.oldteam.Value = player.TeamColor script.Parent.TeamColor = player.TeamColor teamChanging = false end enabled1 = true end
function oTE(part) if not enabled2 then return end enabled2 = false if part.Parent:findFirstChild("Humanoid") ~= nil then teamChanging = false player = game.Players:getPlayerFromCharacter(part.Parent) script.Parent.BrickColor = script.Parent.oldteam.Value script.Parent.Reflectance = 0 end enabled2 = true end
script.Parent.Touched:connect(oT) script.Parent.TouchEnded:connect(oTE) |
|
|
| Report Abuse |
|
|
ZizZazZuz
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 2743 |
|
|
| 17 Oct 2011 05:17 PM |
| I outlined my problems clearly. What ELSE do you want? |
|
|
| Report Abuse |
|
|
| |
|
ZizZazZuz
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 2743 |
|
|
| 17 Oct 2011 05:19 PM |
| There is none. If there is, it tried to appear after it froze up. |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2011 05:22 PM |
Please explain what happens again, it doesen't really make sense the way you wrote it. Say what happens step by step. Like if you messed up on ends, this would be it: 1)It works 2)It breaks 3)***Exactly what the Output says*** 4)The output says eof and I don't know what that means
|
|
|
| Report Abuse |
|
|
|
| 17 Oct 2011 05:23 PM |
| if the game freezes, you cant see the output >.> and he clearly stated the problem. |
|
|
| Report Abuse |
|
|
ZizZazZuz
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 2743 |
|
| |
|
ZizZazZuz
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 2743 |
|
| |
|
Aerideyn
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 1882 |
|
|
| 17 Oct 2011 06:16 PM |
well the freezing is most likely an infinite loop without a "wait".
looking through the code, i noticed the "wait()" only get called inside of an "if" so if that evaluates to false - there will be no waiting and it will crash. if you need those waits inside those if blocks for timing then just affix a wait() to the top of the loop. |
|
|
| Report Abuse |
|
|
ZizZazZuz
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 2743 |
|
|
| 17 Oct 2011 06:21 PM |
That helped, but now when I step off, it works, but when I step back on, it breaks.
More help, plox? |
|
|
| Report Abuse |
|
|
ZizZazZuz
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 2743 |
|
|
| 17 Oct 2011 07:17 PM |
| I need solid answers! Help! |
|
|
| Report Abuse |
|
|
ZizZazZuz
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 2743 |
|
|
| 17 Oct 2011 07:46 PM |
| Fixed. Thanks for nothing. |
|
|
| Report Abuse |
|
|