Hey so im trng to get this part to rotate correctly. By that i mean i dont want it to be tilted on an axis while its rotating like this https://gyazo.com/9d4777379ee7337688f01771a52aedf6
And this is how it rotates in game https://gyazo.com/0e7db0731079bc473a41a5f07ff502ce
I want it to look like a tornado, but the mesh was imported with an axis and i was wondering if i can rotate this like a tornado still and if i can what would i have to do? Thanks and if im being vague you can ask questions. script
smash.CFrame = character.HumanoidRootPart.CFrame * CFrame.new(0,5,0)
spawn(function()
while smash do
smash.CFrame = smash.CFrame * CFrame.Angles(0,math.pi/10,0)
if game.Workspace:FindFirstChild(player.Name .." 's Smash") then
smash.Size = smash.Size + Vector3.new(1.5,1,1.5)
end
game:GetService("RunService").Heartbeat:Wait()
end
end)
Alright, you just have to apply that CFrame as an offset after the initial positioning and orienting of the part.
I have an example model (but you can just use a single part)
Where the center and primary part is in the center.
If I just rotate it, then it will rotate around the center. Let’s say I want the left most part to be the center of rotation. It is 0,0,3 studs offset. So I apply that as an offset in the code here
local primaryPart = workspace.model.PrimaryPart
local offsetAxis = Vector3.new(0,0,3) -- How far the place we want to rotate from is from the visual center
-- Center of rotation in the world
local centerToRotateAround = Vector3.new(0,20,0)
local testAngle = 0;
while wait() do
primaryPart.CFrame = CFrame.new(centerToRotateAround) * CFrame.Angles(0,testAngle,math.pi/2) * CFrame.new(offsetAxis)
-- Increase the loop test angle
testAngle += math.pi/100
end
local offsetAxis = Vector3.new(12.8, 0, -9.8)
local centerToRotateAround = Vector3.new(0,20,0)
local testAngle = 0;
spawn(function()
while smash do
smash.CFrame = character.HumanoidRootPart.CFrame * CFrame.Angles(0,testAngle,math.pi/2) * CFrame.new(offsetAxis)
testAngle += math.pi/100
if game.Workspace:FindFirstChild(player.Name .." 's Texas Smash Effect") then
smash.Size = smash.Size + Vector3.new(1.5,1,1.5)
end
game:GetService("RunService").Heartbeat:Wait()
end
end)
The math.pi/2 wasn’t meant to be used in yours, most likely. It’ll flip the part. That was just because, in my example, cylinders face a different axis.