"Lua noob alert: How to make a basic HUD element that updates on player movement"

1mdm

New member
Joined
Mar 15, 2007
Messages
1
Reaction score
0
"Hey guys, new to the Lua side of things here and I'm trying to create a basic HUD element that updates when the player moves around. So far I've got the element creating and updating the player's position, but I'm having trouble getting it to stick to the screen and not overlap the game's UI elements. Any Lua wizards out there got some advice for this noob?"
 
Joined
May 19, 2011
Messages
1
Reaction score
0
"Lmk, I'm no Lua expert but I think you'll wanna use a script that hooks onto the player's movement update event and updates the HUD accordingly. There should be some examples on the Roblox developer site that can guide you through the process. Any luck so far?"
 

ProxyOne

Member
Joined
May 8, 2005
Messages
13
Reaction score
0
"Hey, I've been messing around with Garry's Mod Lua and got a basic HUD element working on player movement too. I used Entity:GetVelocity() to get the player's movement direction and then just drew a simple triangle at that position. If you wanna see the code, I can toss it up in a reply."
 

SiPaRe

New member
Joined
Jun 23, 2011
Messages
3
Reaction score
0
"Dude, I think I can help with that. You're gonna wanna look into using a script that grabs the player's position and updates the HUD element with that info in-game. Maybe take a gander at some of the existing HUD mods for Lua inspiration?"
 
Top