#How do i make a depth meter

1 messages · Page 1 of 1 (latest)

chilly eagle
#

I know ABSOLUTLEY NOTHING about coding so ill need step by step help with this, i want to have a depth meter that goes down or up depending on how high up you are in the map. can someone help?

gaunt horizon
chilly eagle
#

can you help or na

gaunt horizon
#

Idk, prob not or prob yes

#

Cuz

#

I started like 1 month and half ago scripting

hearty kraken
# chilly eagle I know ABSOLUTLEY NOTHING about coding so ill need step by step help with this, ...

Make a ScreenGui and put in StarterGui, then put a TextLabel that will display the depth.
Then put a LocalScript inside the TextLabel:

local RunService = game:GetService("RunService")
local TextLabel = script.Parent
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer

RunService.RenderStepped:Connect(function()
  if not LocalPlayer.Character then return end
  if not LocalPlayer.Character.PrimaryPart then return end
  TextLabel.Text = math.floor(LocalPlayer.Character.PrimaryPart.Position.Y)
end)

I havent tested it so let me know if there are errors or if you need anything changed
Basically it just runs the code each frame setting the text to your player's Y position (vertical position if u dont know)

chilly eagle
#

wdym

sonic pendantBOT
#

studio** You are now Level 1! **studio

chilly eagle
#

is that not right

#

i didnt test it i got off before i tested it

civic reef
chilly eagle
#

also does anyone have an actual answer to my original question

civic reef
#

You don’t need to wait for school to start before learning

#

It’s useless

chilly eagle
#

yeai i guess

civic reef
civic reef
chilly eagle
#

sure thx

hearty kraken
#

its basically the same as a depth meter, but learning how to make it will definitely help you in the future. you can use my code as a reference when learning

wise shell