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

Motor6D welder not working? Trying to make a Motor6D so the Turret can Rotate?.

Asked by 4 years ago
Edited 4 years ago

My script is supposed to make a Motor6D and make the C0 and C1 connect but its not working. D: can someone help? PS: this is for a turret. I need my turret to be able to move around without breaking a weld. --This is my script--

local base = script.Parent.Body
local Base = script.Parent.VehicleSeat

if script.Disabled == false then

    local motor = Instance.new("Motor6D")
        motor.C0 = base
        motor.C1 = Base
        motor.Parent = base
        motor.Parent = script.Parent
end
0
This isn't Python, please give us the code with all maintaining end's and proper indentation please. Ziffixture 6913 — 4y
0
oh sorry Nervousmrmonkey2 118 — 4y
0
btw i made it so my turret will move but the weld would break i want to make it so the weld will stay :( Nervousmrmonkey2 118 — 4y
0
plz respond Nervousmrmonkey2 118 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Heres my script

local VehicleSeat = script.Parent

local Base = VehicleSeat.Parent.Hull.Bottom
local Swivel = VehicleSeat.Parent.Turret.Top

local W = Instance.new("Motor", Base)
W.Part0 = Base
W.Part1 = Swivel
W.C0 = CFrame.new(0, 0, -0.2) * CFrame.fromEulerAnglesXYZ(0,0,0)

Base.Anchored = false
Swivel.Anchored = false

Base.Motor.DesiredAngle = 0
Base.Motor.MaxVelocity = 0.01

Hope this helps

0
ok i wil try it Nervousmrmonkey2 118 — 4y
0
it didnt work D: Nervousmrmonkey2 118 — 4y
Ad

Answer this question