What I’m currently making is a part that rotates on the player’s HRP, though it works properly there’s an issue with its rotation speed.
The issue is that it rotates faster than normal when the player is on a higher, or lower Y-axis, I’ve tried using Angles and CFrame.Orientation but it has the same result,
Since I’m still an intermediate scripter, I didn’t do much complex math so its really basic, How this works is that the rotating blue energy VFX is CFramed - 25 studs away from a rotating invisible part that spawns on your HRP.CFrame and the VFX gradually increases the distance between you and the player sucking anyone in.
Here is the code
local part = Instance.new("Part", Character)
part.Name = "Spinny"
part.Anchored = true
part.Size = Vector3.new(1, 1, 1)
part.CanCollide = false
part.Transparency = 1
part.CFrame = hrp.CFrame
local Distance = -25
for i = 1, 360 do
part.CFrame = part.CFrame * CFrame.Angles(0,-math.rad(part.CFrame.Y + .1),0)
BlueHRP.CFrame = part.CFrame * CFrame.new(0,4,Distance)
Distance -= .25
task.wait(.01)
end
When I use this on the ground it works perfectly,
When I’m at a higher altitude, it goes crazy
If anyone could help me figure out what I did wrong it would be much appreciated, thank you.