GetDistanceFromCharacter is not a valid member of Player "Players.MadionChooi"
if Player:GetDistanceFromCharacter(Mouse.Hit.p) <= 60 then
Player.Character:MoveTo(Mouse.Hit.p)
GetDistanceFromCharacter is not a valid member of Player "Players.MadionChooi"
if Player:GetDistanceFromCharacter(Mouse.Hit.p) <= 60 then
Player.Character:MoveTo(Mouse.Hit.p)
DistanceFromCharacter(), there is no “Get”.
https://developer.roblox.com/en-us/api-reference/function/Player/DistanceFromCharacter
you can just do
if (Player.HumanoidRootPart.Position - Mouse.Hit.p).Magnitude <= 60 then
---blah
end
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.