I am creating a scary game and I would like to know how to alter the camera so that saturation goes up and down suddenly as a function of jumpscare
Notice this is my first time scripting so I am 100% sure this is wrong
local part = script.Parent
local camera = workspace.CurrentCamera
local function onPartTouched(otherPart)
-- Get the other part's parent
local partParent = otherPart.Parent
-- Look for a humanoid in the parent
local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
if humanoid then
-- Do something to the humanoid, like set its health to 0
workspace.CurrentCamera.ColorCorrection.Saturation = -100
wait(0.1)
workspace.CurrentCamera.ColorCorrection.Saturation = 0
wait(0.1)
workspace.CurrentCamera.ColorCorrection.Saturation = -100
wait(0.1)
workspace.CurrentCamera.ColorCorrection.Saturation = 0
wait(0.1)
workspace.CurrentCamera.ColorCorrection.Saturation = -100
wait(0.1)
workspace.CurrentCamera.ColorCorrection.Saturation = 0
wait(0.1)
workspace.CurrentCamera.ColorCorrection.Saturation = -100
wait(0.1)
workspace.CurrentCamera.ColorCorrection.Saturation = -100
wait(0.1)
workspace.CurrentCamera.ColorCorrection.Saturation = 0
wait(0.1)
workspace.CurrentCamera.ColorCorrection.Saturation = -100
wait(0.1)
end
end
part.Touched:Connect(onPartTouched)

1 comment
This works thank you, this is my first time doing these things so im pretty much new