How to fix this getdistance for character

GetDistanceFromCharacter is not a valid member of Player "Players.MadionChooi"
	if Player:GetDistanceFromCharacter(Mouse.Hit.p) <= 60 then

DistanceFromCharacter(), there is no “Get”.

1 Like

you can just do

if (Player.HumanoidRootPart.Position - Mouse.Hit.p).Magnitude <= 60 then

Right, but “:DistanceFromCharacter()” is essentially a wrapper for all that math. Also “HumanoidRootPart” is a child of the player’s character, not the player itself.

1 Like