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

How do you change the server's lighting by the touch of a brick?

I tried server and local scripts and It still won't work.

`function onTouch()

game.Lighting.ClockTime = 0 game.Lighting.OutdoorAmbient = Color3.new(0/255,0/255,0/255)

script.Parent.Touched:connect(onTouch) end`

5 comments

0

use Color3.fromRGB(255,255,255) instead, and (im not sure if this is the problem) end the function before the touched event.

0

try this bro.

0

function ontouch()

0

It's ok, I got the answer I looked for.

0

function ontouch() game.Lighting.ClockTime = 0 game.Lighting.OutdoorAmbient = Color3.fromRGB(255.255.255) end script.Parent.Touched:Connect(ontouch) end

1 answer

✓ Accepted answer

Try this

script.Parent.Touched:Connect(function(hit)
	if hit.Parent.Humanoid then
		game.Lighting.ClockTime = 0
		game.Lighting.OutDoorAmbient = Color3.New(0/255,0/255,0/255)
	end
end)

if it doesn't work try this

script.Parent.Touched:Connect(function(hit)
	if hit.Parent.Humanoid then
		game.Lighting.ClockTime = 0
		game.Lighting.OutDoorAmbient =Color3.fromRGB(255,255,255)
	end
end)

3 comments

0

ServerScript or Local?

0

serverscript

0

tysm it worked

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