Hello im just learning some basic, i trying to make a coin rotate over himself on y axe while it is in middle of a box and a yellow ball. (lerp), the lerp work alone and the coin rotating too but the two at same time not. Some know how to solve it?
Can you paste your code? I don’t believe :Lerp is necessary for this.
local cubito = game.Workspace.cubito
local moneda = game.Workspace.moneda
while wait() do
cubito.CFrame = CFrame.lookAt(cubito.Position,game.Workspace.Target.Position)
moneda.CFrame = cubito.CFrame:Lerp(game.Workspace.Target.CFrame,0.5)
moneda.CFrame = moneda.CFrame * CFrame.Angles(0,math.rad(2),0)
end
Try this:
--//Services
local cubito = workspace.cubito
local moneda = workspace.moneda
--//Loops
while task.wait() do
cubito.CFrame = CFrame.lookAt(cubito.Position,game.Workspace.Target.Position)
moneda.CFrame = cubito.CFrame:Lerp(workspace.Target.CFrame, 0.5)
moneda.Orientation += Vector3.yAxis
end
It contine doing the lerp but the coin dont rotate over himself thanks for try.