Billboard GUI tween not working

Hey guys, I tried making a currency pop up whenever you collect at XP orb and it worked, unfortunately it looked bland, so i tried adding some tweens.

I tried going for a dissolve type tween but it doesn’t work.

-Script That Receives The Event And Creates Reward.

local function CreateReward()
if player.Character.PrimaryPart:FindFirstChild(“Reward”) then
local T2 = TS:Create(player.Character.PrimaryPart:FindFirstChild(“Reward”).amount, TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {TextTransparency = 0})
local T22 = TS:Create(player.Character.PrimaryPart:FindFirstChild(“Reward”).icon, TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {ImageTransparency = 0})
player.Character.PrimaryPart:FindFirstChild(“Reward”).amount.Text = player.Character.PrimaryPart:FindFirstChild(“Reward”).amount.Text + tostring(10)
T2:Play()
T22:Play()
task.wait(4)
if player.Character.PrimaryPart:FindFirstChild(“Reward”) then
player.Character.PrimaryPart:FindFirstChild(“Reward”):Destroy()
else
–print(“Already Deleted”)
end
else
local Clone = Reward:Clone()
Clone.Parent = player.Character.PrimaryPart
Clone.Name = “Reward”
Clone.amount.Text = tostring(10)
local T2 = TS:Create(Clone.amount, TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {TextTransparency = 0})
local T22 = TS:Create(Clone.icon, TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {ImageTransparency = 0})
T2:Play()
T22:Play()
task.wait(4)
if Clone then
Clone:Destroy()
else
–print(“Already Deleted”)
end
end
end

RS.Game.Events.RewardOrbSystem.OnClientEvent:Connect(function()
CreateReward()
end)

-And a Server Script that does the process.

local event = game:GetService(“ReplicatedStorage”).Game.Events.AwardXpParticle
local event2 = game:GetService(“ReplicatedStorage”).Game.Events.RewardOrbSystem
local Reward = game:GetService(“ReplicatedStorage”).Game.Assets.UI.Reward
local TweenService = game:GetService(“TweenService”)

event.OnServerEvent:Connect(function(player)
player.Data.Exp.Value += 10
event2:FireClient(player)
end)

If you have a way to fix this please reply! Thank you.

do you mean that the ui is not dissolving the away?

i think you need to change this part:

		local Clone = Reward:Clone()
		Clone.Parent = player.Character.PrimaryPart
		Clone.Name = “Reward”
		Clone.amount.Text = tostring(10)
		local T2 = TS:Create(Clone.amount, TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {TextTransparency = 0})
		local T22 = TS:Create(Clone.icon, TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {ImageTransparency = 0})
		T2:Play()
		T22:Play()
		task.wait(4)
		if Clone then
			Clone:Destroy()
		else
			–print(“Already Deleted”)
		end

the two tweens turn the trasnparency to 0 instead of 1 which would make it transparent. also when pasting in code, its much better to use this symbol ` pasted on the start and end of the code to make it fromatted like mine ;D

Dude thank you so much, i messed up the transparency i put 0 instead of 1 :rofl:

1 Like

LOL no problem same thing happens to me too :joy:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.