I’m making a 3D platformer and i want to make a Super Mario 64 healthbar or like Adventure’s end healthabar here’s an image
so i know how to do the base, basically you set everything to ddo 25 damage and turn of your health regeneration which i already did, but what i dont understand is how do i make the gui move? it’s really confusing, at start i tought it would be easy, but when i got to scripting it, it was pretty hard. So please send any sources thanks!
What do you mean by moving? Do you want the health bar to tween down or up as the health changes, or have the entire health circle have a bounce effect like when you take damage in Super Mario 64?
i’m trying to do something close to mario styled healthbar, that’s what i’m trying to do but it is really hard. (for me atleast)
I’m going to assume you mean both in this case. Let’s start with the more necessary, have you been able to make it so when you take damage, one of the healthbars goes away yet?
i assume you just do something like when you get 25 dammage you just set one of the 4 gui invisible but what i don’t know, is how do i do the backwards, like when you collect a health booster.
The health booster would bring the health up by however much. Do something like this (it is just pseudo code btw, don’t put this in your game)
players = game:GetService(“Players”)
local function addHP(part)
local humanoid = part.Parent:FindFirstChild(“Humanoid”)
if humanoid then
humanoid.Health = 100
local player = players:GetPlayerFromCharacter(humanoid.Parent)
healthAdded:FireClient(player)
end
end
healthbooster.Touched:Connect(function(addHP))
HealthAdded is a remoteEvent that you would create and specify.
with that code done, create a local script like this:
healthAdded.OnClientEvent:Connect(function()
— do stuff here to make all health bars visible.
)
This isn’t what i was talking about but i still found the answear to my question, thanks.
Edit: oh sorry actually it did help.