Hello!
If you are searching for a premade model that can show information on the player interface just like Minecraft does, you are on the perfect place to be satisfied!
In this short showcase, I am going to explain to you how to import, use and modify this model in order to be comfortable with it.
1. How to import it
Importing the model is extremely simple.
First, click on this link in order to download the RBXM file: InfoLinesHuD.rbxm (10.4 KB)
Then, Drag&Drop the file you just downloaded in Roblox Studio, and parent it to StarterGui.
[I didn’t make any model for this in the creator marketplace because of the garbage roblox moderation that could ban me for putting a model onsale (go check r/ROBLOXBans to understand what I’m talking about)]
2. How to use it
In order to use this model, I recommend you understanding the basic knowledge of LuaU so that it will be way easier for you to use it.
So, to use it, you will only have to open Main and use the LineMaker module in order to make it work.
To use LineMaker, you only have to use these 3 simple functions:
---------------------------------------------------------
lineMaker:Create(key:string?,value:(string|number)?)
lets you create an info Line with a key, and a value (which is optional).
Here are some examples on how to use it:
lineMaker:Create("FPS")
wait()
lineMaker:Create("CharacterType:", game:GetService"Players".LocalPlayer.Character~=nil and game:GetService"Players".LocalPlayer.Character:FindFirstChild("Humanoid")and game:GetService"Players".LocalPlayer.Character.Humanoid.RigType==Enum.HumanoidRigType.R6 and"R6"or"R15")
---------------------------------------------------------
lineMaker:Update(key:string?,value:(string|number)?)
lets you update an info Line which is identified using an existing key. To use it, you must enter a valid key, and a valid value.
For instance, to continue the previous example, we can update the FPS count just like this:
coroutine.wrap(function()while wait(.1)do
lineMaker:Update("FPS",string.sub(tostring(1/game:GetService"RunService".RenderStepped:Wait()),0,4))
end end)()
---------------------------------------------------------
lineMaker:Delete(key:string?)
lets you delete an info line using a key.
For instance, let’s say we created a “CharacterType” line. Well, if you would like to remove it, you can just do lineMaker:Delete("CharacterType")
and you’re done!
3. How to modify it
Well, for some simple things you might want to modify, it may be possible to do it by just editing the UI.
For example, if you want to change the InfoLine Text Font, you can modify it by editing this TextLabel properties:
For more advanced customization, you may have to directly modify the LineMaker module script.
Thank you
Thank you for reading all of this. I hope it will help some people in their game development.
Please keep in mind that I made these scripts in a short amount of time, so they may not really be optimized.
I may also release updates on the LineMaker module soon, in order to improve it and add new functionalities to this script.
Have a wonderful day!