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

What do I put around my values in this script?

Asked by 10 years ago
function onTouched(hit)
    script.Parent.Parent.Parent.Lighting.Ambient.R = '14'
    script.Parent.Parent.Parent.Lighting.Ambient.G = '37'
    script.Parent.Parent.Parent.Lighting.Ambient.B = '181'
    wait(0.5)
end

script.Parent.Touched:connect(onTouched)

Please help if you can ,or is it the capital R,G,B

1 answer

Log in to vote
0
Answered by
hudzell 238 Moderation Voter
10 years ago

Here is a fixed version

function onTouched(hit)
    wait(0.5)
    script.Parent.Parent.Parent.Lighting.Ambient = Color3.new(14/255,37/255,181/255)
end

script.Parent.Touched:connect(onTouched)

(click view source next to the Lua attachment)

0
Thanks so much SirThomasGodishere 0 — 10y
Ad

Answer this question