Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

why is my motion blur script that uses lookvector not working?

Asked by 6 years ago
Edited 6 years ago

hi, i am making a motion blur script where it takes the lookvector, and if it changes, it enables the blur effect in lighting. I am not that skilled with lookvector, so if anyone could fix this script, it would help a lot.

while true do
local char = script.Parent
local plr = game.Players:GetPlayerFromCharacter(char)
local blur = game.Lighting.Blur
local lV = char.LowerTorso.CFrame.lookVector.Z
char.LowerTorso.Changed:connect(function()
if char.LowerTorso.CFrame.lookVector.Z ~= lV then
    blur.Enabled = true

end
end)
wait()
    blur.Enabled = false
end

Answer this question