Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to get your player's current position with a LocalScript in a ScreenGui?

I have a TextLabel that's supposed to say your player's current position, the TextLabel is in a ScreenGui, is there anyway to do this because I can't figure it out, preferably in a LocalScript but if it has to be in a normal Script then that's fine c:

1 answer

✓ Accepted answer
local plr = game:GetService("Players").LocalPlayer

local posLabel = script.Parent
while wait(.1) do
	local char = plr.Character or plr.CharacterAdded:Wait()
	local hrp = char:WaitForChild"HumanoidRootPart"
	posLabel.Text = tostring(hrp.Position)
end

1 comment

0

Thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.