I am working on creating an outlines module script that easily creates outlines on any part, but i cant figure out how to set the cframe when it depends on the camera cframe.
How do i set the cframe so that the CylinderHandleAdornment will always look at the camera?
local Run = game:GetService("RunService")
Run.RenderStepped:connect(function()
local cf = workspace.CurrentCamera.CFrame - workspace.CurrentCamera.CFrame.Position
workspace.Part.CylinderHandleAdornment.CFrame = cf
end)
local Run = game:GetService("RunService")
local camera = workspace.CurrentCamera
local part = workspace.Part
local chandle = part.CylinderHandleAdornment
Run.RenderStepped:connect(function()
local cf = CFrame.lookAt(chandle.CFrame.p, part.CFrame.p)
chandle.CFrame = cf
end)
local Run = game:GetService("RunService")
local camera = workspace.CurrentCamera
local part = workspace.Part
local chandle = part.CylinderHandleAdornment
Run.RenderStepped:connect(function()
local cf = CFrame.lookAt(chandle.CFrame.p, part.CFrame.p)
workspace.TestPart.CFrame = cf
chandle.CFrame = cf
end)
local Run = game:GetService("RunService")
local camera = workspace.CurrentCamera
local part = workspace.Part
local chandle = part.CylinderHandleAdornment
Run.RenderStepped:connect(function()
local cf = CFrame.lookAt(chandle.CFrame.p, camera.CFrame.p)
chandle.CFrame = cf
end)
i was on vacation sory for taking 19 days to anwer
ps: if that still not work try messing with the cframes until u get the right formula