Assuming the parts in the model is unanchored and welded together, would I use SetPrimaryPartCFrame()? Attempting to make a flippable table with animation. Preferable on a key down function, using magnitude to check if your next to it Here's what I got so far..
mouse=game.Players.LocalPlayer:GetMouse() function checkTableDistance(torso,table,dist) for i,v in pairs(table) do if (v.Position-torso.Position).magnitude<=dist then return true end end. end function findNearestTable(torso,table) mags={} for i=1,#table do table.insert(mags,#mags+1,(#table[i].Position-torso.Position).magnitude) end return math.min(mags) end while wait(0.5) do if checkTableDistance(game.Players.LocalPLayer.Character.Torso ,Workspace.table:GetChildren()) then --gui end mouse.KeyDown:connect(function(key) if key=="e" and checkTableDistance() then table=findNearestTable(game.Players.LocalPlayer.Character.Torso,Workspace.table:GetChildren()) --table flippy end end)
Set a primary part to the model, use SetPrimaryPartCFrame
and GetPrimaryPartCFrame
,
Model:SetPrimaryPartCFrame(Model:GetPrimaryPartCFrame() * CFrame.Angles(--[[your angle X,Y,Z]]))