Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How come Color3 isnt working right?

Asked by 9 years ago
--Dusty Road
local p = script.Parent

p.Touched:connect(function(hit)
        local dust = Instance.new("Part", p)
        dust.Transparency = 1
        dust.Anchored = true
        dust.CanCollide = false
        dust.Size = Vector3.new(1,0.5,1)
        if hit.Parent:FindFirstChild("Humanoid") then
            dust.CFrame = hit.Parent["Right Leg"].CFrame + Vector3.new(0,-2,0)
            local smoke = Instance.new("Smoke", dust)
            smoke.Color = Color3.new(84, 61, 16)--For some reason the smoke is white not brown
            smoke.Size = 0.3
            smoke.RiseVelocity = 0.2
            smoke.Opacity = 0.5
            wait(0.8)
            dust:Destroy()
        end
end)

1 answer

Log in to vote
1
Answered by
Lacryma 548 Moderation Voter
9 years ago

Color3 takes in a decimal value between 0 and 1.

To apply this, simply divide all values by 255.

As a result, it should be:

Color3.new(84/255, 61/255, 16/255)

Ad

Answer this question