Horizontal height bar

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to achieve the same thing as this A height determining GUI? but instead of going up and down on the bar, I want the player to go horizontally across the bar.

  2. What is the issue? Include screenshots / videos if possible!
    How do I go about this…?

I’ve tried doing it on my own but everytime I test my code, it does not work. Is there some kind of simple math equation I can apply to getting the position for the players?

As long as you have the minimum and maximum bounds and the player position, yes.

local maxHeight, minHeight = 1000, 0 -- change these numbers to fit your game
local playerHeight = rootPart.Position.Y -- given that rootPart is the player's HumanoidRootPart
local scale = (playerHeight - minHeight) / (maxHeight / minHeight)
-- use the scale for the gui
1 Like