#Is .Position still a valid code?

1 messages · Page 1 of 1 (latest)

daring iris
#

The code I used it in, local distance = tower.Position - enemy.Position, doesn't seem to be working, did I do something wrong or is it something that was changed?

idle trench
daring iris
#

Yep

#

local tower = script.Parent
local enemy = workspace.Enemy

idle trench
daring iris
#

Ah

#

So it should be tower:GetPivot?

torpid sageBOT
#

studio** You are now Level 1! **studio

daring iris
#

Now I need to figure out how Magnitude works-

idle trench
daring iris
#

Thing is, when I try doing local distance = (tower:GetPivot() - enemy.Position).Magnitude to get a single number, it says magnitude is not a valid member of CFrame

haughty spindle
daring iris
#

Ahhh, thanks!