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

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

Asked by 6 years ago
Edited 6 years ago

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`

0
use Color3.fromRGB(255,255,255) instead, and (im not sure if this is the problem) end the function before the touched event. radusavin366 617 — 6y
0
try this bro. dallylogan 29 — 6y
0
function ontouch() dallylogan 29 — 6y
0
It's ok, I got the answer I looked for. DuckMaster11211 13 — 6y
0
function ontouch() game.Lighting.ClockTime = 0 game.Lighting.OutdoorAmbient = Color3.fromRGB(255.255.255) end script.Parent.Touched:Connect(ontouch) end dallylogan 29 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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)
0
ServerScript or Local? DuckMaster11211 13 — 6y
0
serverscript FirezoneGamez 155 — 6y
0
tysm it worked DuckMaster11211 13 — 6y
Ad

Answer this question