Still have questions? Join our Discord server and get real time help.
1

# My magnitude refuses to print() when a certain magnitude is reached. Help?

Here is the section of my code:

local Player = game.Players.LocalPlayer
local Door = game.Workspace.Door1
local SetDistance = 10
if (Door.Position - Player.Character.Head.Positon).Magnitude < SetDistance then


I am inexperienced to magnitude so this is new, however it is refusing to print atleast once.

This is worspace>localscript

I don't like to use script helper unless if its a last resort, however I make stupid mistakes in my script that I cannt identify.

0
Or its just properties, eitherway I need help. ifreakinlostmyacount 52 — 18d
0
could you show us more of the code raid6n 2117 — 18d
0
No, because thats all thats needed, its not a problem with the rest of the code. ifreakinlostmyacount 52 — 18d
0
because after this its suppose to "print", and its near the beginning where I list all of my possible variables. ifreakinlostmyacount 52 — 18d
0
there is no print greatneil80 2152 — 17d

2

Is the localscript located in the workspace ? if it is then the localscript wont run

0
Oh sorry, your right, It was just properties, I usually code when I'm tired and make alot of mistakes. sorry for not upvoting your answer. ifreakinlostmyacount 52 — 17d
1
Edited 17 days ago

The only problem I noticed is that you misspelled Position, instead it was 'positon'.

local Player = game.Players.LocalPlayer
local Door = game.Workspace.Door1
local SetDistance = 10
if (Door.Position - Player.Character.Head.Position).Magnitude < SetDistance then
-- Do stuff
end