Accessing Player's model from a normal script?
Hello, I have a script that requires the distance between the character (specifically the character's torso) and an object in Workspace. However, I can't find a way to access the Player's model! The code looks a bit like this (cropped to include relevant parts only):
2 | local magnitude = (script.Parent.Position - game.Players.LocalPlayer.Character.Torso.Position).magnitude |
5 | elseif magnitude > = 10 then |
Obviously this doesn't work because LocalPlayer can only be used in LocalScripts. If anyone could find an answer, that'd be great. Thanks in advance!