Attempt to index nil with 'FindFirstChild'

i’m trying to make the animation work but this keeps happening!

the code:
(line 19)

local module = {}
module.__index = module

function module.use(chr)
	return setmetatable({
		Model = game:GetService('ReplicatedStorage'):FindFirstChild('Assets'):FindFirstChild('BloxyCola');
		Drinking = false;
		Character = chr;
		StaminaRegen = 50;
	}, module)
end

function module:active()
	self.Drinking = true;
	local Model = self.Model:Clone()
	local Animation = game:GetService('ReplicatedStorage'):FindFirstChild('Animations'):FindFirstChild('DrinkingCola')
	local Humanoid = self.Character.Humanoid
	Model.Parent = self.Character
	Model.Position = self.Character:FindFirstChild('Right Arm'):FindFirstChild('RightGripAttachment').Position
	Model.Orientation = self.Character:FindFirstChild('Right Arm'):FindFirstChild('RightGripAttachment').Orientation
	
	local weld = Instance.new('WeldConstraint')
	weld.Parent = Model
	weld.Part0 = Model
	weld.Part1 = self.Character:FindFirstChild('Right Arm')
	
	Humanoid.Animator:LoadAnimation(Animation):Play()
end

return module

Is your Character R6? Also maybe replace the module.use to module.new.

Yes, the character is R6 and i tried the module.new and both didnt worked :confused:

Edit: i managed to figure it out, i forgot to add WorldCFrame before Position.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.