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 5 years ago
Edited 5 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--

01local base = script.Parent.Body
02local Base = script.Parent.VehicleSeat
03 
04if script.Disabled == false then
05 
06    local motor = Instance.new("Motor6D")
07        motor.C0 = base
08        motor.C1 = Base
09        motor.Parent = base
10        motor.Parent = script.Parent
11end
0
This isn't Python, please give us the code with all maintaining end's and proper indentation please. Ziffixture 6913 — 5y
0
oh sorry Nervousmrmonkey2 118 — 5y
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 — 5y
0
plz respond Nervousmrmonkey2 118 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Heres my script

01local VehicleSeat = script.Parent
02 
03local Base = VehicleSeat.Parent.Hull.Bottom
04local Swivel = VehicleSeat.Parent.Turret.Top
05 
06local W = Instance.new("Motor", Base)
07W.Part0 = Base
08W.Part1 = Swivel
09W.C0 = CFrame.new(0, 0, -0.2) * CFrame.fromEulerAnglesXYZ(0,0,0)
10 
11Base.Anchored = false
12Swivel.Anchored = false
13 
14Base.Motor.DesiredAngle = 0
15Base.Motor.MaxVelocity = 0.01

Hope this helps

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

Answer this question