Actually i using this script for parts but how can i make one for models?
local partspeed = 0.05
local part = script.Parent
while task.wait() do
part.CFrame = part.CFrame * CFrame.Angles(0,partspeed,0)
end
Actually i using this script for parts but how can i make one for models?
local partspeed = 0.05
local part = script.Parent
while task.wait() do
part.CFrame = part.CFrame * CFrame.Angles(0,partspeed,0)
end
local model = PATH_TO_MODEL
local spin = 25
while task.wait() do
model:PivotTo(model:GetPivot() * CFrame.Angles(0, math.rad(spin), 0))
end
Hello @s_schwerer!
This is how you spin an object.
local partspeed = 0.05
local model = script.Parent
while true do
for _, part in pairs(model:GetDescendants()) do
if part:IsA("BasePart") then
part.CFrame = part.CFrame * CFrame.Angles(0, partspeed, 0)
end
end
wait()
end
If you found my answer useful, do not forget to mark it as solved .
@Katastro5
You can use model.PrimaryPart
local partspeed = 0.05
local Model = script.Parent
while task.wait() do
Model.PrimaryPart.CFrame = Model.PrimaryPart.CFrame * CFrame.Angles(0,partspeed,0)
end
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.