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: Problems with old WIJ technology

Previous Thread :: Next Thread 
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
16 Aug 2012 03:55 PM
Hello everyone. I've recently been amusing myself by tearing apart some old style WIJ technology. However, I've come across an issue. Very sorry for massive code chunk, however, I'm basically trying to change the BackgroundColor3 of a GUI frame.

======================================
function check()
if equiped==true then
if player.PlayerGui:findFirstChild("GunGui") ~= nil then
player.PlayerGui.GunGui.Back.Frame:TweenSize(UDim2.new(Charge.Value/MaxCharge,0,1,0),"In","Linear",0.1)
if overheated == false then
player.PlayerGui.GunGui.Back.Status.Text = Charge.Value.."%"
player.PlayerGui.GunGui.Back.Frame.BackgroundColor3 = Color3.new(255, 255, 153)
--sp.Name=ToolName.." | "..Charge.Value.."%"
end
end
sp.Ammo.Value = Charge.Value
end
end

--Ugly, I hate corrotines, oh well :)

function recharge()
while true do
wait(cooldownTime)
if down==false then
--if equiped==true then
if overheated == false then
if Charge.Value>0 then
Charge.Value=Charge.Value-2--+math.random(1, 3) --not needed imo
check()
end
end
--end
end
end
end

thread=coroutine.create(recharge)
assert(coroutine.resume(thread))

function onChargeChanged()
if Charge.Value >= MaxCharge then
Charge.Value = 100
overheated = true
for i = 1, MaxCharge do
wait(overheattime/MaxCharge)
Charge.Value = Charge.Value - 1
if player.PlayerGui:findFirstChild("GunGui") ~= nil and equiped == true then
player.PlayerGui.GunGui.Back.Status.Text = "Recharging"
player.PlayerGui.GunGui.Back.Frame.BackgroundColor3 = Color3.new(256-255, 256-0, 256-0)
--sp.Name=ToolName.." | "..Charge.Value.."%"
end
sp.Ammo.Value = Charge.Value
check()
if Charge.Value==0 then
overheated = false
if player.PlayerGui:findFirstChild("GunGui") ~= nil and equiped == true then
player.PlayerGui.GunGui.Back.Status.Text = Charge.Value.."%"
player.PlayerGui.GunGui.Back.Frame.BackgroundColor3 = Color3.new(255, 255, 153)
--sp.Name=ToolName.." | "..Charge.Value.."%"
end
break
end
end
overheated = false
end

if Charge.Value <= 0 then
Charge.Value = 0
if player.PlayerGui:findFirstChild("GunGui") ~= nil then
player.PlayerGui.GunGui.Back.Status.Text = Charge.Value.."%"
player.PlayerGui.GunGui.Back.Frame.BackgroundColor3 = Color3.new(255, 255, 153)
--sp.Name=ToolName.." | "..Charge.Value.."%"
end
end

end
sp.Ammo.Changed:connect(onChargeChanged)
======================================

Alright, so inside you can see 3 Color3.new(255,255,153)s. That will produce a Cool yellow color, however, whenever I fire the gun, it always snaps back to (1,1,103) which is almost a navy blue. I've checked everything inside of the script for a trace of (1,1,103), but I haven't found anything.

Can anyone give me a pointer on what it is that I am doing wrong?
Report Abuse
Joalmo is not online. Joalmo
Joined: 28 Jun 2009
Total Posts: 1160
16 Aug 2012 04:07 PM
0x009A76E3
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
16 Aug 2012 04:19 PM
Sorry, what?

bump.
Report Abuse
Joalmo is not online. Joalmo
Joined: 28 Jun 2009
Total Posts: 1160
16 Aug 2012 04:30 PM
You asked for a pointer
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
17 Aug 2012 09:22 AM
And I got many numbers and letters.

Sorry, I don't understand.. q-q
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
17 Aug 2012 09:26 AM
Anyone else want to help?
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
17 Aug 2012 09:39 AM
Gee, seems like a very simple error that I'm not understanding.

Granted you volunteer, but no one has the time to type an answer?
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