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

My lighting script not working right, not changing anything, no errors??

I have a local script in lighting and it does absolutely nothing. It doesn't even print. I'm trying to make a script to change the skybox and time when a round starts. I have a skybox in ServerStorage, named "Overcast." The local script is parented to Lighting. Help! Local Script:

local Status = game:GetService("ReplicatedStorage"):WaitForChild("Status")
local clonedSky

Status:GetPropertyChangedSignal("Value"):Connect(function()
	
	if Status.Value == "Game in progress." then
		clonedSky = game.ServerStorage.Overcast:Clone()
		print(clonedSky)
		clonedSky.Parent = game.Lighting
		clonedSky.Name = "Overcast"
		script.Parent.ClockTime = 1
	else
		if game.Lighting.Overcast then
			game.Lighting.Overcast:Destroy()
		end
		script.Parent.ClockTime = 12
	end
	
end)

1 answer

Any script does not run in...

Lighting ReplicatedStorage ServerStorage

Only LocalScripts do not run in Workspace or ServerStorage.

There are a few other places too.

2 comments

0

Wording it differently: the lighting, server storage, and replicated storage are just place holders. They can hold scripts and other items, but nothing in there will run.

0

So, where should I put it? StarterGui?

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