I want to be able to create a sort of “sound indicator” such as those seen in Arsenal and Fortnite.
I am unaware of how I would accomplish this. I’ve thought it through and can’t really figure out a key idea to even start with.
I’ve tried searching this up, but no results in what I actually want appear. I could be missing something, so even if it’s as simple as a link, any help would be appreciated!
I would save the health data in run service with a variable, something like this:
rs.Heartbeat:Connect(function()
Health = playerHumanoid.Health
If Health < 100 then
Script.parent.hurtgui.Visible = true --change this to whatever you want,
end
end)
I think what I was trying to convey may have been misunderstood D:
What I meant is, how would I get the position of the player and turn that into a 2d position for the gui to be located, while maintaining a circular position?
TargetPosition - Vector3 position of the target;
This should be done in a RunService RenderStepped signal, then after a few seconds you can disconnect the signal with Signal:Disconnect(), make sure you store the signal on a variable.
local flatCameraCFrame = CFrame.new(Camera.CFrame.Position, Camera.CFrame.Position + Camera.CFrame.LookVector * Vector3.new(1, 0, 1))
local pointRelativeToCamera = Camera.CFrame:PointToObjectSpace(TargetPosition)
local unitRelativeVector = (pointRelativeToCamera).Unit
local rotation = math.atan2(unitRelativeVector.Z, unitRelativeVector.X)
DMGIndicator.Rotation = math.deg(rotation)