Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to change CFrame.Angles without making welded parts move with it?

Asked by
Fad99 286 Moderation Voter
5 years ago

I am trying to make a helicopter, that uses welded parts. When i want the blade to spin it moves the entire heli with it. Im using CFrame.Angles to move the blade. Heres the code:

local Heli = script.Parent
local Vseat = Heli.VehicleSeat
local Circle = Heli.Circle  
local InitalPos = Circle.Position    
local Spin = Heli.Spin    

while true do  
    if Vseat.Occupant then   
        --Chopper Spin | This is the focus
        local I = 170    
        Spin.CFrame = Spin.CFrame * CFrame.Angles(0,I,0)    
        I = I + 1

        if not Circle:FindFirstChild("Hover") then   
            --Hover Effect    
            local Hover = Instance.new("BodyPosition")    
            Hover.Name = "Hover"    
            Hover.MaxForce = Vector3.new(0,400000,0)    
            Hover.Position = Circle.Position + Vector3.new(0,4,0)    
            Hover.Parent = Circle    
            end    
    end

    wait()

    if not Vseat.Occupant then    
        if Circle:FindFirstChild("Hover")then
            Circle.Hover:Destroy()   
        end
     end 
 end

The part you may be looking for is the code under "Chopper Spin"

0
You can't. DeceptiveCaster 3761 — 5y
0
You would have to remove the welds, anchor every part and spin only the part you want to spin. DeceptiveCaster 3761 — 5y
0
Thank you! Fad99 286 — 5y

Answer this question