When tweening this with angles, the eye rotates but for some reason it sets its position to 0, 0, 0. Does anyone know why?
Start Position:
End Position:
Script:
local info = TweenInfo.new(0.25)
local TweenService = game:GetService("TweenService")
while true do
local x = math.random(0, 80)
local y = math.random(0, 80)
local z = math.random(0, 80)
local goal = {}
goal.CFrame = CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))
TweenService:Create(script.Parent.PrimaryPart, info, goal):Play()
wait(math.random(1, 4.5))
end
local info = TweenInfo.new(0.25)
local TweenService = game:GetService("TweenService")
while true do
local x = math.random(0, 80)
local y = math.random(0, 80)
local z = math.random(0, 80)
local goal = {}
goal.CFrame = CFrame.new(script.Parent.PrimaryPart.Position) * CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))
TweenService:Create(script.Parent.PrimaryPart, info, goal):Play()
wait(math.random(1, 4.5))
end
you’re giving the CFrame no position so it’ll default to 0,0,0