Zeloi
|
  |
| Joined: 27 Sep 2010 |
| Total Posts: 1143 |
|
|
| 04 May 2014 04:40 PM |
repeat if script.Parent.BackgroundColor3 == Color3.new(85/255,1,0) and script.Parent.Visible == true then script.Parent.BackgroundColor3 = script.Parent.BackgroundColor3 + Color3.new(1/255, 0, 0) wait() end until script.Parent.BackgroundColor3 == Color3.new(100/255,1,0)
repeat if script.Parent.BackgroundColor3 == Color3.new(100/255,1,0) and script.Parent.Visible == true then script.Parent.BackgroundColor3 = script.Parent.BackgroundColor3 - Color3.new(1/255, 0, 0) wait() end until script.Parent.BackgroundColor3 == Color3.new(85/255,1,0)
for some reason this crashes the game I have no idea why so please help fix it! |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 04 May 2014 04:41 PM |
repeat if script.Parent.BackgroundColor3 == Color3.new(100/255,1,0) and script.Parent.Visible == true then script.Parent.BackgroundColor3 = script.Parent.BackgroundColor3 - Color3.new(1/255, 0, 0) wait() end until script.Parent.BackgroundColor3 == Color3.new(85/255,1,0)
Because this
repeat if script.Parent.BackgroundColor3 == Color3.new(100/255,1,0) and script.Parent.Visible == true then
Is false So the repeat loop doesn't wait() |
|
|
| Report Abuse |
|
|
Zeloi
|
  |
| Joined: 27 Sep 2010 |
| Total Posts: 1143 |
|
|
| 04 May 2014 04:43 PM |
| I don't get it really... so can you uh just fix it and explain more in-depth? |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 04 May 2014 04:44 PM |
while true do if false then wait() end end
Its the same reason this would crash, or do you not know about infinite loops crashing yet? (Its okay if you don't, I'll explain) |
|
|
| Report Abuse |
|
|
Zeloi
|
  |
| Joined: 27 Sep 2010 |
| Total Posts: 1143 |
|
|
| 04 May 2014 04:45 PM |
nvm I fixed the crashing part but it doesent like do anything.
repeat wait() if script.Parent.BackgroundColor3 == Color3.new(85/255,1,0) and script.Parent.Visible == true then script.Parent.BackgroundColor3 = script.Parent.BackgroundColor3 + Color3.new(1/255, 0, 0) wait() end until script.Parent.BackgroundColor3 == Color3.new(100/255,1,0)
repeat wait() if script.Parent.BackgroundColor3 == Color3.new(100/255,1,0) and script.Parent.Visible == true then script.Parent.BackgroundColor3 = script.Parent.BackgroundColor3 - Color3.new(1/255, 0, 0) end until script.Parent.BackgroundColor3 == Color3.new(85/255,1,0) |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 04 May 2014 04:47 PM |
It doesn't do anything because this if script.Parent.BackgroundColor3 == Color3.new(100/255,1,0) and script.Parent.Visible == true then
Is false |
|
|
| Report Abuse |
|
|
Zeloi
|
  |
| Joined: 27 Sep 2010 |
| Total Posts: 1143 |
|
|
| 04 May 2014 04:48 PM |
yhea this is true though : if script.Parent.BackgroundColor3 == Color3.new(85/255,1,0) and script.Parent.Visible == true then
|
|
|
| Report Abuse |
|
|
Zeloi
|
  |
| Joined: 27 Sep 2010 |
| Total Posts: 1143 |
|
|
| 04 May 2014 04:49 PM |
Output - 16:45:07.700 - Players.Player1.PlayerGui.ScreenGui.OverlayG.Script:2: attempt to perform arithmetic on field 'BackgroundColor3' (a userdata value) 16:45:07.700 - Stack Begin 16:45:07.701 - Script 'Players.Player1.PlayerGui.ScreenGui.OverlayG.Script', Line 2 16:45:07.702 - Stack End |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 04 May 2014 04:52 PM |
| script.Parent.BackgroundColor3 = Color3.new(script.Parent.BackgroundColor3.r - 1/255, 0, 0) |
|
|
| Report Abuse |
|
|
Zeloi
|
  |
| Joined: 27 Sep 2010 |
| Total Posts: 1143 |
|
|
| 04 May 2014 05:04 PM |
new script (immediately turns red and doesn't work)
repeat wait() if script.Parent.BackgroundColor3.g >= 150/255 and script.Parent.Visible == true then script.Parent.BackgroundColor3 = Color3.new(script.Parent.BackgroundColor3.g + 1/255) wait() end until script.Parent.BackgroundColor3 == Color3.new(85/255,1,0)
repeat wait() if script.Parent.BackgroundColor3 == Color3.new(85/255,1,0) and script.Parent.Visible == true then script.Parent.BackgroundColor3 = Color3.new(script.Parent.BackgroundColor3.g - 1/255) end until script.Parent.BackgroundColor3 == Color3.new(85/255,150/255,0) |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 04 May 2014 05:07 PM |
I said Color3.new(script.Parent.BackgroundColor3.r - 1/255, 0, 0)
not Color3.new(script.Parent.BackgroundColor3.g - 1/255) |
|
|
| Report Abuse |
|
|
Zeloi
|
  |
| Joined: 27 Sep 2010 |
| Total Posts: 1143 |
|
|
| 04 May 2014 05:07 PM |
Newer script - doesn't turn red but still doesn't work
repeat wait() if script.Parent.BackgroundColor3.g >= 150 and script.Parent.Visible == true then script.Parent.BackgroundColor3.g = Color3.new(script.Parent.BackgroundColor3.g + 1/255) wait() end until script.Parent.BackgroundColor3.g == 255
repeat wait() if script.Parent.BackgroundColor3.g == 255 and script.Parent.Visible == true then script.Parent.BackgroundColor3.g = Color3.new(script.Parent.BackgroundColor3.g - 1/255) end until script.Parent.BackgroundColor3.g == 150 |
|
|
| Report Abuse |
|
|