OK, so for some reason on my view model which uses Motor6D to rotate these goggles up and down, after a few times of doing so, it gets stuck, it stops working, still sets the desired angle! but doesn’t turn, I can confirm that the Motor6D Isn’t broken because if I change the current angle it works, any help?
max velocity never changes either, even me changing it mid game still won’t work!
(no error messages)
(everything in the viewmodel is cancollide false)
local script:
local function opticDown(input, nobodyusesthis)
if script.Parent.Gear:FindFirstChild("Goggles").Value == true then
if input.KeyCode == Enum.KeyCode.N then
if opticDownr == false and debounce == true then
debounce = false
ViewHead.HeadGear.AUICH.mount.Motor.DesiredAngle = -1.55
wait(4)
debounce = true
opticDownr = true
elseif opticDownr == true and debounce == true then
debounce = false
ViewHead.HeadGear.AUICH.mount.Motor.DesiredAngle = 0
wait(3)
debounce = true
opticDownr = false
end
end
end
end
any help?
I don’t know how, but eventually it gets a downward velocity of like -1000000 and then stops working, really weird.
changed it to this:
local function opticDown(input, nobodyusesthis)
if script.Parent.Gear:FindFirstChild("Goggles").Value == true then
if input.KeyCode == Enum.KeyCode.N then
if opticDownr == false and debounce == true then
debounce = false
ViewHead.HeadGear.AUICH.mount.Motor.DesiredAngle = -1.55
for i, part in pairs(ViewHead.HeadGear:GetDescendants()) do
if not part:IsA("Model") and not part:IsA("Folder") and not part:IsA("Beam") and not part:IsA("RopeConstraint") and not part:IsA("Attachment") and not part:IsA("Weld") and not part:IsA("Motor6D") then
part.LocalTransparencyModifier = 0
if not part:IsA("Texture") then
part.AssemblyLinearVelocity = Vector3.new(0,0,0)
end
end
end
wait(4)
debounce = true
opticDownr = true
elseif opticDownr == true and debounce == true then
debounce = false
ViewHead.HeadGear.AUICH.mount.Motor.DesiredAngle = 0
for i, part in pairs(ViewHead.HeadGear:GetDescendants()) do
if not part:IsA("Model") and not part:IsA("Folder") and not part:IsA("Beam") and not part:IsA("RopeConstraint") and not part:IsA("Attachment") and not part:IsA("Weld") and not part:IsA("Motor6D") then
part.LocalTransparencyModifier = 0
if not part:IsA("Texture") then
part.AssemblyLinearVelocity = Vector3.new(0,0,0)
end
end
end
wait(3)
debounce = true
opticDownr = false
end
end
end
end