How can i change the fire color in a script when i try to make a tycoon dropper? (im not a master scripter, just a Robloxian)
function fire()
local p = Instance.new("Part")
p.Position = script.Parent.Position
p.Size = Vector3.new(2,2,2)
p.BrickColor = BrickColor.new(208)
p.Material = "Pebble"
p.Friction = 0
p.Reflectance = 0
p.BottomSurface = 0
p.TopSurface = 0
p.Name = "Caesium"
p.Parent = script.Parent
local f = Instance.new("Fire")
f.Parent = p
f.Size = 1
f.Heat = 1
f.Color = Color3.New(3,145,8)
f.SecondaryColor = Color3.New(34,48,255)
end
while true do wait(2) fire() end
f.Color = Color3.New(3,145,8) f.SecondaryColor = Color3.New(34,48,255)
Two problem here. First, I am pretty sure new
must be lower case. It could be one of the things in Roblox Lua that is not case sensitive, but I've never seen it capital before.
The main problem, however, is how you're using Color3. Color3 only takes a number between 0 and 1. If you want a number between 0 and 255, you must divide it by 255 to again have a number between 0 and 1.
f.Color = Color3.new(3/255, 145/255, 8/255) f.SecondaryColor = Color3.new(34/255, 48/255, 1) --No need to put 255/255, just put 1.