Issue with torso/Character

im getting an error
image
i think the issue may be due to the character, yet I’m unsure as to why I’m unable to call the character.
here is what I’m using in my other script
image

local module = {}

module.RaceTypes = function(player, race)
	local rs = game:GetService("ReplicatedStorage")
	if race == Skypeian then
		print("module works2")
		for i,v in rs.RaceAccessories:GetChildren() do
			if v.Name == "Skypeian" then
				print("module works")
				local wings = v:Clone()
				--wings:ScaleTo(player.leaderstats.Scale.Value)
				local Weld = Instance.new("WeldConstraint")
				local chr = player.character
				wings.Position = player.chr.Torso.Position
				wings.Orientation = player.chr.Torso.Orientation
				wings.Parent = player.chr
				Weld.Part0 = player.chr.Torso
				Weld.Part1 = wings

			end
		end
		
	end
	
	
	
	
end
return module

local chr = player.character

should be player.Character with an uppercase ‘C’

i changed that, it still brings the same error message index nil with Torso

You should use the variable chr, not player.chr because there’s no instance called chr in the player

So it should be like this:
chr.Torso

1 Like

Then you should directly call “chr” and not the player before.

idk how i missed that, i changed it, also even after changing it, the error msg still appears I haven’t misspelt Torso, nor does a wait for child work

Okay so here, you’re supposed to do (plr, plr.leaderstats.Race.Value)

This works perfectly, thanks ( word limit)

1 Like

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