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 » Scripters
Home Search
 

Re: First few times using elseif...

Previous Thread :: Next Thread 
marfit is not online. marfit
Joined: 10 Jan 2013
Total Posts: 2539
13 May 2016 09:33 PM
And it does nothing but make the text 255,255,255.

local temp = script.Parent.Value.Value
while true do
if temp > 4000 then
script.Parent.TextColor3 = Color3.new(255,0,0)
elseif temp < 4000 and temp > 3000 then
script.Parent.TextColor3 = Color3.new(255,91,0)
elseif temp < 3000 and temp > 2200 then
script.Parent.TextColor3 = Color3.new(255,255,0)
elseif temp < 2200 and temp > 1000 then
script.Parent.TextColor3 = Color3.new(189,255,0)
elseif temp < 1000 and temp > 500 then
script.Parent.TextColor3 = Color3.new(30,193,255)
elseif temp < 500 then
script.Parent.TextColor3 = Color3.new(0,0,255)
end
wait()
end


This is a script inside of a textlabel, the temperatures change based off of another script (that works)
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
13 May 2016 09:35 PM
--Try this.
function color(a,b,c)
return Color3.new(a/255,b/255,c/255)
end

script.Parent.TextColor3 = color(0,0,255)


Report Abuse
Brick_Wizard is not online. Brick_Wizard
Joined: 15 Mar 2016
Total Posts: 2072
13 May 2016 09:35 PM
It needs to be 255/255, 91/255, 0/255

e.g.

script.Parent.TextColor3 = Color3.new(255/255, 91/255, 0/255)


Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
13 May 2016 09:35 PM
Color3.new is meant to take numbers between 0 and 1, so divide all your arguments by 255
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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