Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What do I put around my values in this script?

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

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)

1 comment

0

Thanks so much

This discussion is preserved as it was. New answers, comments, and votes are closed.