My LocalScript in StarterGui errors "Stormy_Sky is not a valid member of ServerStorage" when it is. LocalScript:
local Status = game.ReplicatedStorage:WaitForChild("Status") local clonedSky if game.ServerStorage.Stormy_Sky then print("Yes.") end 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" game.Lighting.ClockTime = 1 else if game.Lighting.Overcast then game.Lighting.Overcast:Destroy() end game.Lighting.ClockTime = 12 end end)
Do I need to change it to a Script?
PS. It won't print "Yes."
ServerStorage is for the server only, so localscripts are not able to access it. Localscripts do, however, have access to replicated storage. If what you are doing needs a localscript to work, you should use a remote event.
edit: If it doesn't need to be a localscript then make it serverside and leave it as is.
Strange, I've been testing works yes ! try putting the script in ServeScriptService
PRINT: http://prntscr.com/p8pj9b
is it a local script?
when yes, local scripts can't acces serverstorage.
use a Script instead or put it in replicatedstorage