Carry script not working on player

I recently made a carry script for one of the games im working on It works on npcs just fine but refuses to work on players, the script is filtering enabled and has nothing wrong with it (even tested it and the player carrying the npc would appear on screen, but wouldnt work on other players as i just said) if anyone has a solution for this please let me know

Can I see your script? 30 chars.

local ray =["Right Leg"].CFrame.p, (hit.p -  char["Torso"].CFrame.p).unit*range)
	local hit, position = game.Workspace:FindPartOnRay(ray, user)
	local humanoid = hit and hit.Parent:FindFirstChild("Humanoid")

i used some source code that worked fine on players

That is most likely because your code is directed towards r6. If you want to keep it that way, force all player’s chars to be r6.

my code is directed to r6, i dont use any type of r15 at all