Hi all
I am was working on a script which will change certain aspects of lighting and it’s children when the player goes to sleep but the script wont run.In output the error which is showing up is R is not assigned to.I really dont know what that means and could really use some help identifying the problem.
-- local ProximityPrompt =script.Parent.Prompt.ProximityPrompt
local Dest = game.Workspace.Dest
local Desti = game.Workspace.Haha
local Lighting = game.Lighting
ProximityPrompt.Triggered:Connect(function()
for _, player in pairs(game.Players:children())do
local char = player.Character
char.HumanoidRootPart.CFrame = Dest.CFrame
wait(4)
char.HumanoidRootPart.CFrame = Desti.CFrame
end
while true do
wait()
Lighting.Sky.SkyboxBk = "http://www.roblox.com/asset/?id=13943307"
Lighting.Sky.SkyboxDn = "http://www.roblox.com/asset/?id=13943307"
Lighting.Sky.SkyboxFt = "http://www.roblox.com/asset/?id=13943307"
Lighting.Sky.SkyboxLf = "http://www.roblox.com/asset/?id=13943307"
Lighting.Sky.SkyboxRt = "http://www.roblox.com/asset/?id=13943307"
Lighting.Sky.SkyboxUp = "http://www.roblox.com/asset/?id=13943307"
Lighting.Sky.SunTextureId = "http://www.roblox.com/asset/?id=1230280516"
Lighting.TimeOfDay = "13:00:00"
Lighting.Brightness = 0.55
Lighting.Ambient.R = 0
Lighting.Ambient.B = 0
Lighting.Ambient.G = 0
Lighting.EnvironmentDiffuseScale = 0
Lighting.EnvironmentSpecularScale = 0
Lighting.Atmosphere.Color.R = 0
Lighting.Atmosphere.Color.G = 0
Lighting.Atmosphere.Color.B = 0
Lighting.Atmosphere.Decay.R = 0
Lighting.Atmosphere.Decay.G = 0
Lighting.Atmosphere.Decay.B = 0
Lighting.Atmosphere.Density = 0.9
Lighting.ColorCorrection.Enabled = true
Lighting.ExposureCompensation = -1
game.Workspace["Scary Ambience "].Playing = true
game.Workspace.Trigger.CanCollide = true
game.Workspace.Trigger.Script.Disabled = false
game.Workspace.ScriptRandomizer.Disabled = false
game.Workspace.DoubleBed.Prompt:Destroy()
end
end)