|
| 03 Aug 2017 11:05 PM |
| I created a function that creates a part based on the position of #### ###### ####### It takes rotation into account so I have to set the parts CFrame in order to do so. The problem is, the part needs to be unanchored but the part will not move after setting its CFrame. Is there any way to get around this? |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2017 11:07 PM |
? just unanchor or anchor it with the script you use or for i,v in pairs(game.Workspace:GetChildren()) do if v.CFrame = CFrame.new(CFrame) then v.Anchored = false end end) |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2017 11:07 PM |
*based on the position of 4 vertices.
|
|
|
| Report Abuse |
|
|
|
| 03 Aug 2017 11:08 PM |
yeah thats the problem. Nothing happens when you unanchor it. It is as if setting its CFrame overrides any anchoring value.
|
|
|
| Report Abuse |
|
|
Niveum
|
  |
| Joined: 15 Aug 2009 |
| Total Posts: 3437 |
|
|
| 03 Aug 2017 11:10 PM |
part.Changed:connect(function() if part.CFrame = specific_cframe then part.Anchored = false end end)
~ S P I C Y ~ |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2017 11:15 PM |
| i have no idea what that is supposed to accomplish. Here is my script. I don't think it will help though: local car = script.Parent local wheels = car.wheels function ####################### ####### ###### ###### local frontHalf = (front1.Position + front2.Position) local longHalf = (front1.Position + rear1.Position) local longDirec = (front1.Position - rear1.Position).unit local size = Vector3.new((front1.Position - front2.Position).magnitude - front1.Size.X, 1, (front1.Position-rear1.Position).magnitude + 2) local pos = Vector3.new((frontHalf/2).X, (longHalf/2).Y, (longHalf/2).Z) local cf = ############### ### + longDirec) return {size, cf} end local base = Instance.new('Part', wheels) base.Name = 'base' base.Anchored = true local stats = CFrameFromPoint(wheels.FL, wheels.FR, wheels.RL, wheels.RR) base.Size = stats[1] base.CFrame = stats[2] |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|