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
 

Re: Color thingy

Previous Thread :: Next Thread 
tibiscus is not online. tibiscus
Joined: 24 Nov 2008
Total Posts: 9533
23 Mar 2013 07:50 PM
I found this awkard color code thingy:

0, 0, 256-153

What's that "-" for?

Does it have a name?
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
23 Mar 2013 07:53 PM
subtract...
256-153 = 103
0, 0, 256-153 = 0,0,103
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
23 Mar 2013 08:04 PM
You may be suprised to know that its name is the minus symbol(Or the dash depending on context).
Report Abuse
tibiscus is not online. tibiscus
Joined: 24 Nov 2008
Total Posts: 9533
23 Mar 2013 08:17 PM
heatgui.Bar1.Bar2.BackgroundColor3=Color3.new(0, 0,227-1)

So, I got that, it's supposed to be yellow,
It's black.

I tried 255, 255, 0 as well.

Still another color, not yellow.
Help please.


Yes, I know i'm a total noob at scripting, but that's why I came here in the first place.
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
23 Mar 2013 08:19 PM
heatgui.Bar1.Bar2.BackgroundColor3 = Color3.new(0, 0,226/255)
Report Abuse
tibiscus is not online. tibiscus
Joined: 24 Nov 2008
Total Posts: 9533
23 Mar 2013 08:20 PM
That's blue,
Report Abuse
tibiscus is not online. tibiscus
Joined: 24 Nov 2008
Total Posts: 9533
23 Mar 2013 08:22 PM
Ugh...
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
23 Mar 2013 08:24 PM
I just fixed the code you put up to demostrate how to do it.

heatgui.Bar1.Bar2.BackgroundColor = BrickColor.new("Bright yellow")

Happy?
Report Abuse
tibiscus is not online. tibiscus
Joined: 24 Nov 2008
Total Posts: 9533
23 Mar 2013 08:26 PM
It broke the entire script.
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
23 Mar 2013 08:27 PM
Have you considered that it is you who broke the script?
Report Abuse
tibiscus is not online. tibiscus
Joined: 24 Nov 2008
Total Posts: 9533
23 Mar 2013 08:29 PM
Nope, after I pasted the part with brick color, it broke the script,
Here's the entire script without pasting the thing in:


--Controller, this script is the local controller it is responsable for connecting the functions of each tool. These are peformed using local shared tables (_G), the method used to connect the tools is very inefficient however is functional. If you are considering on using snippets I would reccomend editing the tool connection system to be less haxy.
wait(.45)
-- pre-define --
sp=script.Parent
local plr=game.Players.LocalPlayer
local camera=game.Workspace.CurrentCamera
local chr=plr.Character
local pgui=plr:findFirstChild("PlayerGui")
local backpack=plr:findFirstChild("Backpack")
local debris=game:GetService("Debris")
local lighting=game:GetService("Lighting")
local heatgui=sp.HeatFrame

repeat wait(.05) until pgui and backpack

local connections={}
_G.IsEquipped=false
_G.CanFire=false
_G.IsWelded=false
_G.GunStatsLoaded=false
local lasthealth=100
_setmaxhealth=100
local pointschain=0
local descpos=-170

Icons={"http://www.roblox.com/asset/?id=91822850", "http://www.roblox.com/asset/?id=91822843"}
--hires(test)Icons={"http://www.roblox.com/asset/?id=105080423", "http://www.roblox.com/asset/?id=105080548"} It is recommended you don't use Hires icons.

Connected={}
-- misc. functions --
equipTool=function(mouse,tool)
--equip
_G.IsWelded=false
_G.GunStatsLoaded=false
_G.IsEquipped=true
tool["Stats"].Disabled=true
tool["Stats"].Disabled=false
_G.weldHandle(tool, chr["Torso"], true)
if tool:findFirstChild("ARC") then --if gun do, if sword dont
tool["Stats"]["Battery"].Changed:connect(_G.SetBattery)
heatgui.Visible=true
mouse.Icon=Icons[1]
heatgui.Battery.Text="Battery "..tostring(tool["Stats"]["Battery"].Value)
if tool["Stats"]["Overheat"].Value then
heatgui.Bar1.Bar2.BackgroundColor3=Color3.new(256-170, 0, 0)
else
heatgui.Bar1.Bar2.BackgroundColor3=Color3.new(0, 256-44, 256-112)
end
--connect
mouse.Button1Down:connect(function() _G.Mouse1Down(mouse) end)
mouse.Button1Up:connect(function() _G.Mouse1Up(mouse) end)
heatgui.Visible=true
end
end

unequipTool=function(mouse,tool)
_G.weldHandle(tool, chr["Torso"], false)
heatgui.Visible=false
end

_G.connectTool=function(tool)
local c1=tool.Equipped:connect(function(mouse) equipTool(mouse,tool) end)
local c2=tool.Unequipped:connect(function(mouse) unequipTool(mouse,tool) end)
table.insert(connections, c1) table.insert(connections, c2)
end


-- backp. connect --
backpack.ChildAdded:connect(function(child) --expect new guns
wait()
for i = 1, #connections do
connections[i]:disconnect()
end
connections={}
local c=backpack:GetChildren()
for i = 1, #c do
local tool=c[i]
if tool:findFirstChild("ARC")~=nil or tool:findFirstChild("ARCnoweld")~=nil then
_G.connectTool(tool)
end
end
local c=chr:GetChildren()
for i = 1, #c do
local tool=c[i]
if tool:IsA("Tool") and (tool:findFirstChild("ARC")~=nil or tool:findFirstChild("ARCnoweld")~=nil) then
_G.connectTool(tool)
end
end
end)

local c=backpack:GetChildren() --set up
for i = 1, #c do
local tool=c[i]
if tool:findFirstChild("ARC")~=nil or tool:findFirstChild("ARCnoweld")~=nil then
_G.connectTool(tool)
end
end


-- start --
--rayignore-- (Creates a RayIgnore model in the Workspace, probably not the best idea to execute this in a local environment, but hey.. Blame SS)
if workspace:findFirstChild("RayIgnore")==nil then
local m=Instance.new("Model", workspace) m.Name="RayIgnore"
end
Report Abuse
tibiscus is not online. tibiscus
Joined: 24 Nov 2008
Total Posts: 9533
23 Mar 2013 08:32 PM
Bump.
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
23 Mar 2013 08:33 PM
Divide the Color3s by 255 and also I don't see where you pasted it in.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
23 Mar 2013 08:33 PM
Chubb's code is fine. Any output?

(╯°□°)> KMXD
Report Abuse
tibiscus is not online. tibiscus
Joined: 24 Nov 2008
Total Posts: 9533
23 Mar 2013 08:33 PM
I pasted it in at Backround color.
Report Abuse
tibiscus is not online. tibiscus
Joined: 24 Nov 2008
Total Posts: 9533
23 Mar 2013 08:34 PM
Divide what?
Report Abuse
tibiscus is not online. tibiscus
Joined: 24 Nov 2008
Total Posts: 9533
23 Mar 2013 08:38 PM
bump
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
23 Mar 2013 08:39 PM
Mabye instead of copying Owen's work you should make your own gun.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
23 Mar 2013 08:39 PM
Either Background colors should work, one might not work as expected, but the code itself shouldn't error, the problem must lie elsewhere.

(╯°□°)> KMXD
Report Abuse
tibiscus is not online. tibiscus
Joined: 24 Nov 2008
Total Posts: 9533
23 Mar 2013 08:40 PM
@MrChubbs

It was released for the public.

So why not use it eh?
Report Abuse
NitroArpan is not online. NitroArpan
Joined: 10 Jan 2012
Total Posts: 847
01 Apr 2013 10:27 AM
@MrChubbs She's right, even I am trying to the same as her... Plus I am not that great at scripting guns and some people aren't either, so chill.And help.. And not break the script..
Report Abuse
NitroArpan is not online. NitroArpan
Joined: 10 Jan 2012
Total Posts: 847
01 Apr 2013 10:42 AM
@tibi Try this

I think I put it green, but check..

heatgui.Bar1.Bar2.BackgroundColor3=Color3.new(0,256-170,0)
Report Abuse
TehChikenHater is not online. TehChikenHater
Joined: 11 Jun 2012
Total Posts: 497
01 Apr 2013 11:11 AM
In ROBLOX, the RGB colour coding is different then your standard coloring, such as HTML and CSS. Instead of using RGB(255,255,255), ROBLOX uses 0-1, and instead of RGB(255,255,255) for white, you would use RGB(1,1,1). To translate from RGB(255,255,255) to ROBLOX, add a "/255" to each RGB colour value. For example, white would be this:

RGB(255/255,255/255,255/255)

Which translates to RGB(1,1,1)

Report Abuse
stroudie is not online. stroudie
Joined: 28 Nov 2008
Total Posts: 2556
01 Apr 2013 11:44 AM
I just use Color3.new(REDVAL*(1/255),GREENVAL*(1/255),BLUEVAL*(1/255)) to set Color3 values to an exact colour.
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