Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local RunService = game:GetService("RunService")
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "CoordinatesDisplay"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = player:WaitForChild("PlayerGui")
- local textLabel = Instance.new("TextLabel")
- textLabel.Size = UDim2.new(0, 250, 0, 30)
- textLabel.Position = UDim2.new(0, 10, 0, 10)
- textLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- textLabel.BackgroundTransparency = 0.3
- textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- textLabel.Font = Enum.Font.SourceSans
- textLabel.TextSize = 18
- textLabel.Text = "Position: ..."
- textLabel.Parent = screenGui
- RunService.RenderStepped:Connect(function()
- local character = player.Character
- local rootPart = character and character:FindFirstChild("HumanoidRootPart")
- if rootPart then
- local pos = rootPart.Position
- textLabel.Text = string.format("Position: X: %.1f, Y: %.1f, Z: %.1f", pos.X, pos.Y, pos.Z)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement