So I’m making this tool where if you activated it, it will duplicate a color correction from the tool itself and put it in lighting so it’s a client only. But How do i make the color correction rainbow? I have tried putting a script inside of it and making it disabled and when it clones the Color correction to lighting it enables the script but it doesn’t seem to work. Here is the script inside the tool:
local DB = false
local tool = script.Parent
local anim = Instance.new("Animation")
anim.AnimationId = "http://www.roblox.com/Asset?ID=6947444958"
local track
tool.Activated:Connect(function()
if not DB then
DB = true
tool.Handle.CWeld:Destroy()
tool.Handle.Cork.Pop:Play()
wait(1)
track = script.Parent.Parent.Humanoid:LoadAnimation(anim)
track.Priority = Enum.AnimationPriority.Action
track.Looped = false
track:Play()
wait(0.5)
tool.Handle.DrinkSound:Play()
wait(3)
tool.Handle.Part.Transparency = 1
wait(math.random(10,25))
local ts = game:GetService("TweenService")
local cam = workspace.CurrentCamera
local Time = 53
local AppleShade = tool.AppleJuice:Clone()
local Color = AppleShade.Color
ts:Create(cam, TweenInfo.new(Time), {FieldOfView = 120}):Play()
game.SoundService.Blank:Play()
game.SoundService.Music:Pause()
AppleShade.Parent = game.Lighting
wait(0.1)
Color.Enabled = true
wait(53)
game.SoundService.Music:Resume()
game.SoundService.Blank:Stop()
cam.FieldOfView = 70
AppleShade:Destroy()
DB = false
tool:Destroy()
end
end)
and this is the script inside the color correction:
local CC = game.Lighting:WaitForChild("AppleJuice")
while true do
for i = 0,1,0.01 do
CC.TintColor = Color3.fromHSV(i,1,1)
wait(0.1)
end
end
but int he end i get an error saying:
Enabled is not a valid member of Script “Lighting.AppleJuice.Color” - Client - ClientHandler:36