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.
Is the localscript located in the workspace ? if it is then the localscript wont run
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
Firstly the local script is in the workspace, local scripts do not function in the workspace
And secondly you did not tell it to print anything