My part rotates for 5 seconds then it just completely disappears

local part = script.Parent
local core = part.Parent:FindFirstChild("Core")
if not core then
	warn("Core not found")
	return
end

local speedX = 60
local speedY = 90
local speedZ = 45

local RunService = game:GetService("RunService")

local rotation = CFrame.new()

RunService.RenderStepped:Connect(function(dt)
	local rotationDelta = CFrame.Angles(
		math.rad(speedX * dt),
		math.rad(speedY * dt),
		math.rad(speedZ * dt)
	)

	rotation = rotation * rotationDelta
	part.CFrame = core.CFrame * rotation
end)

This is a localscript and basically what happens it rotates for about 5 seconds then it freezes and disappears completely from the explorer and view

I think “part” needs to be anchored. I was able to replicate your problem when it wasn’t anchored, but it works as intended when it is anchored.

Its probably unanchored/gains momentum and then roblox physics heppens :horror:

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.