Hi! I have a problem where I am trying to make a part circle a player, but when the game starts I can see the part for 1 second, then it disappears for some reason.
Here is the video:
I don’t know what could be causing this as the part is anchored, but that doesn’t seem to be as it just disappears and doesn’t fall. It could maybe be a coding error, but I really don’t know.
Here is my code:
local RS = game:GetService("RunService")
local Char = script.Parent
local HRP = Char.HumanoidRootPart
local orbitPart = script.Parent:WaitForChild("Part")
orbitPart.Anchored = true
orbitPart.Name = "ORBITTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT"
local cycleDur = 15
local distance = 5
local i = 0
RS.RenderStepped:Connect(function(dt)
i = (i + dt/cycleDur) % 1
local alpha = 2 * math.pi * i
orbitPart.CFrame = CFrame.Angles(0, alpha, 0) * CFrame.new(0,0, distance) + HRP.Position
print(orbitPart.CFrame)
end)```