You can write your topic however you want, but you need to answer these questions:
I Want to recreate this pet simulator 99 effect, which i am a big fan of for my game.
-- If needed i am gonna provide screenshots from my game!
Please dont write so much code if you can try to explain, i want to learn and get more knowledge!
Maybe make a textlabel each time you collect money , set the text to the collected amount, randomise the position and tween it to move up. Also adding a coroutine can help so it doesn’t overlap.
Thank you for responding, can you give me an example of what i should do?
This is my code for know, i get what you mean but i have a problem with tweens
local function Affect()
local Clones = {}
for i = 1, 2 do
local Clone = Orb:Clone()
Clone.Parent = game.Workspace
table.insert(Clones, Clone)
end
for i, clone in Clones do
clone.Position = StartPosition + Vector3.new((i - 2) * Spacing, 0, 0)
end
game.SoundService.OrbSystem.Start:Play()
game.SoundService.OrbSystem.Mid:Play()
for i, clone in Clones do
local StartPosition = clone.Position
local Tween = CreateTween(clone, TargetPosition)
Tween:Play()
local StartTime = tick()
RunServiceEvent = RUNS.RenderStepped:Connect(function()
local Time = (tick() - StartTime) / info.Time
if Time > 1 then
clone.Position = TargetPosition
return
end
clone.Position = CurvePath(StartPosition, character.PrimaryPart.Position, Height)(Time)
end)
task.spawn(function()
Tween.Completed:Wait()
local Clone2 = Aura:Clone()
Clone2.Parent = player.Character.PrimaryPart
clone.AuraColor.Enabled = false
clone.Transparency = 1
Clone2:Emit(1)
local eventY = game:GetService("ReplicatedStorage").Game.Events.AwardXpParticle
eventY:FireServer(game.Players.LocalPlayer)
game.SoundService.OrbSystem.End:Play()
task.wait(1)
clone:Destroy()
Clone2:Destroy()
RunServiceEvent = nil
end)
end
end
RS.Game.Events.FireXpParticle.OnClientEvent:Connect(function()
Affect()
end)
uhm the website is gltiched but here.
I made a quick system, Its a bit scuffed, but you can change it however you want.
local TweenService = game:GetService("TweenService")-- Get TweenService
local info = TweenInfo.new(3)--Define tween info, edit this how you like.
local TextBox = script.Parent-- reference the template(text box)
local function moneytext()-- make a new function
local RandomCurrencyAmount = math.random(10, 250)--randomize the amount of money, set this to what you need
local Text = RandomCurrencyAmount.."$"-- add a dollar sign at the end
local TextBox2 = TextBox:Clone()-- clone the template
TextBox2.Parent = TextBox.Parent--set the parent to the screengui
TextBox2.Text = Text-- set the text to the amount
TextBox2.Position = UDim2.new(0, math.random(100, 700), 0, math.random(100, 300))--randomize the position on the screen
TextBox2.TextTransparency = 0-- make the text appear
task.wait(0.3)--wait a little
TweenService:Create(TextBox2, info, {Position = TextBox2.Position+UDim2.new(0,0,-1,0)}):Play()-- move the text up
task.wait(0.8)-- wait a little
TextBox2:Destroy()--destroy the text
TextBox:Destroy()-- destroy the template
end
while task.wait(0.5) do-- loop
moneytext()
end
they use a module function called ‘CreateParticleHost’ that i can add to this post, that function will return a part thats 0.001^3 and an attachment inside of it. then the will use another function that will add a billboard gui with an image label and text label, that is a child of the attachment. that function most likely returns the billboard and the client script then will listen to a remote event for any updates regarding data changes (which is what the script looks for). as for the slight rising animation, thats a cframe animation from the ‘ParticleHost’ that just resets every time the remote event is called. Here is the ‘CreateParticleHost’ function that i made, and most likely is similar to what they use
return function(p1) -- p1 = vector position or cframe
local v1 = Instance.new("Part"); -- Part
v1.Anchored = true;
v1.CanCollide = false;
v1.Transparency = 1;
v1.Material = Enum.Material.SmoothPlastic;
v1.CastShadow = false;
v1.Size = Vector3.new();
v1.CFrame = typeof(p1) == "Vector3" and CFrame.new(p1) or p1;
v1.Name = "host";
local v2 = Instance.new("Attachment"); -- Attachment
v2.Parent = v1;
v1.Parent = workspace
return v1, v2;
end;