How would a curve/falling effect for a BillboardGui (like it was affected by gravity) be created?
Any help is appreciated, thank you.
How would a curve/falling effect for a BillboardGui (like it was affected by gravity) be created?
Any help is appreciated, thank you.
You mean the curve for the damage thingy?
It actually isnt a bezier curve but it seems like a billboard gui on an invisible part thats start in front of the rootPart and then it tweens in a random direction from the x and y axis and after like 0.6 seconds after that it resizes itself (the billboard’s size) to 0,0,0,0
Personally ive never tried making a damage text thingy so this could work or not
Here’s a close approximation. Add a ScreenGui to StarterGui then paste in this Local Script. Adjust as necessary. For example, change the easing style to Sine or Cubic to produce a different arc.
local TweenService = game:GetService("TweenService")
local label = Instance.new("TextLabel")
label.Position = UDim2.fromScale(0.5, 0.5) -- put in center of screen
label.Text = "13.5"
label.TextColor = BrickColor.new("Really red")
label.TextSize = 40
label.BackgroundTransparency = 1
label.Parent = script.Parent
local origPos = label.Position
local origSize = label.TextSize
local arcTime = 0.3
for i = 1, 10 do
task.wait(1)
label.Position = origPos
label.TextSize = origSize
local driftX = Random.new():NextNumber(-0.2, 0.2)
local tweenUp = TweenService:Create(label, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
Position = UDim2.fromScale(label.Position.X.Scale * (1 + driftX / 2), label.Position.Y.Scale * 0.5)
})
local tweenDown = TweenService:Create(label, TweenInfo.new(arcTime * 0.75, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {
TextSize = origSize * 0.75,
Position = UDim2.fromScale(origPos.X.Scale * (1 + driftX), origPos.Y.Scale * 0.75)
})
tweenUp:Play()
tweenUp.Completed:Once(function()
tweenDown:Play()
end)
end