How do I make this work in a LocalScript?
local part1 = workspace.Part1
local part2 = game.Players.LocalPlayer.Character.HumanoidRootPart
local magnitude = (part1.Position - part2.Position).magnitude
print(magnitude)
How do I make this work in a LocalScript?
local part1 = workspace.Part1
local part2 = game.Players.LocalPlayer.Character.HumanoidRootPart
local magnitude = (part1.Position - part2.Position).magnitude
print(magnitude)
What are you saying? Are you seeing if your script works before using it? Are you having difficulties with Server/LocalScripts?
It already works in a LocalScript.
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
Doesn't work for me :/
Please elaborate.
The LocalScript is in Workspace, there's nothing in the Output. It's not disabled, I dunno whats wrong.
localscripts dont execute in the workspace they only execute in playergui the players backpack playerscripts or decendants of the players character