generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

I love this forum...

Previous Thread :: Next Thread 
ZizZazZuz is not online. 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 is not online. 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
TrueSoulWolf is not online. TrueSoulWolf
Joined: 02 Apr 2011
Total Posts: 460
17 Oct 2011 05:18 PM
Show us the output.
Report Abuse
ZizZazZuz is not online. 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
TrueSoulWolf is not online. TrueSoulWolf
Joined: 02 Apr 2011
Total Posts: 460
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
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
17 Oct 2011 05:23 PM
if the game freezes, you cant see the output >.> and he clearly stated the problem.
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
17 Oct 2011 05:45 PM
Soo... Is there a fix?
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
17 Oct 2011 06:06 PM
Help me out here
Report Abuse
Aerideyn is not online. 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 is not online. 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 is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
17 Oct 2011 07:17 PM
I need solid answers! Help!
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
17 Oct 2011 07:46 PM
Fixed. Thanks for nothing.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image