You gotta add the look vector instead of multiplying it. Also you are not supplying the goal params to :Create (ie. you are giving “Goal” instead of “SpikeGoal”); is that a mistake?
It’s because you’re using Spike.CFrame * Spike.CFrame.LookVector * 5,
That does not calculate end position Instead use spike’s orientation to determine it’s direction
local Spike = script.Spike:Clone()
Spike.Orientation = Vector3.new(0, Degrees * i, 90)
Spike.Position = IcyModel.PrimaryPart.Position - Vector3.new(0, 2, 0)
Spike.Parent = workspace
local SpikeInfo = TweenInfo.new(1)
local angle = math.rad(Degrees * i)
local direction = Vector3.new(math.cos(angle), 0, math.sin(angle))
local goalPosition = Spike.Position + direction * 20 -- Your Distance Here
local SpikeGoal = {
CFrame = CFrame.new(goalPosition, goalPosition + direction)
}
local SpikeTween = TweenService:Create(Spike, SpikeInfo, SpikeGoal)
SpikeTween:Play()
Thanks for pointing out that i used the wrong params and wrong symbols i seem to have missed that because i assumed my math was wrong (it was thanks to mythical for correcting me really appreciate it)
cos and sin are used here because they’re efficient way to convert an angle into a 2d direction vector
cos angle gives the x and sin angle will give you z of anunit vector on a circle that way we will create a direction vector that points outward from the center at the specified angle which is what we need for a spike around point
Imaging standing in a round room Pointing
cos(angle) would be left and right movement
sin angle would be forward/backward movement
This lets you accurately point to any spot on the room wall