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

How do i Detect a player pos with a script?

i need a script that can detect a players position and tell the player it.

1 answer

To get the players position, you can use their HumanoidRootPart, because every rig type, whether R6 or R15, uses the HumanoidRootPart.

local player = game:GetService("Players"):FindFirstChild("Player1") -- Replace Player1 With the player your trying to find the Position for.

local character = player.Character or player.CharacterAdded:Wait()
local root = character:WaitForChild("HumanoidRootPart")
print(root.CFrame.p)

1 comment

0

Try putting an event that fires every time the HumanoidRootPart's position is changed, and you should change the FindFirstChild part with LocalPlayer.

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