Why won't the Motor6D be created?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

i want to make a Motor6D item in which i did, i DO NOT NEED ANY NEW TUTORIALS as i already have a working one, it just won’t work for this item?

  1. What is the issue? Include screenshots / videos if possible!

the issue is that the Motor6d won’t be created.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

i did not look for solutions, i asked for someones help and they suggested to check if it fires and it doesn’t and i tried changing the script up a bit but still nothing out of it, still get the same result. so this is my last way to figure out the problem. anyway heres some pictures (including the explorer)
image
image

local Players = game.Players
local Player = Players:GetPlayerFromCharacter(Char)
local tool = script.Parent
local ReplicatedStorage = game.ReplicatedStorage
local Dispenser = ReplicatedStorage.Outlines.DispenserOutline
local Cooldown = 100
local CanBuild = true

local function Build()
	if CanBuild == false then
		return
	end
	CanBuild = false
	SwingAnimationTrack:Play()
	SwingAnimationTrack.Completed:Wait()
	local DispenserClone = Dispenser:Clone()
	DispenserClone.Parent = workspace.Clones
	DispenserClone.DispenserOutline.Orientation = Torso.Orientation
	DispenserClone.DispenserOutline.CFrame = Torso.CFrame * CFrame.new(0,0,-5)
	wait(Cooldown)
	CanBuild = true
end

tool.Activated:Connect(Build)


tool.Equipped:Connect(function()
	Char = tool:FindFirstAncestorWhichIsA("Model")
	Torso = Char:findFirstChild("Torso")
	Humanoid = Char.Humanoid
	Animator = Humanoid.Animator

	grip = Instance.new("Motor6D")
	grip.Parent = Char:FindFirstChild("Right Arm")
	grip.Part0 = Char:FindFirstChild("Right Arm")
	grip.Part1 = tool.FakeHandle
	grip.C0 = CFrame.new(0,0,0)
	grip.C1 = CFrame.new(0,0,0)

	Player = Players:GetPlayerFromCharacter(Char)
	-- Load animations
	SwingAnimationTrack = Animator:LoadAnimation(script.SwingAnimation)
	SwingAnimationTrack.Priority = Enum.AnimationPriority.Action
	SwingAnimationTrack.Looped = false

	HoldAnimationTrack = Animator:LoadAnimation(script.HoldAnimation)
	HoldAnimationTrack.Priority = Enum.AnimationPriority.Movement
	HoldAnimationTrack.Looped = true

	HoldAnimationTrack:Play()
end)
tool.Unequipped:Connect(function()
	grip:Destroy()
	SwingAnimationTrack:Stop()
	HoldAnimationTrack:Stop()
end)

1 Like

The parent of the Motor6d is the RightArm of your character, and you trying to find the Motor6d inside the tool?

i tried that and it isn’t there

no it’s just so you know how it looks in explorer

Well it’s probably because of the way your getting the character, if is a normal script you should take the character like this:

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)

    end)
end) 

Also you should use :WaitForChild() To
get the humanoid to prevent the script from breaking

lemme try that, so lemme open studio back up

Because the script is in the tool, so you can get the character by getting the parent of the tool (or use GetPlayerFromCharacter()).

Still not the right way to call the character.

it didn’t work so it still won’t be created