I made a remote event which fully functions as it's meant to but every time it happens It doesn't change the text transparency back to 0 how it should do. Here is my script:
local RS = game:GetService("ReplicatedStorage")
local eventsFolder = RS:WaitForChild("RemoteEvents")
local xpEvent = eventsFolder:WaitForChild("XpNotify")
local notifier = script.Parent
local TweenService = game:GetService("TweenService")
--//Tweening Information
local tInfo = TweenInfo.new(1)
local goal = {}
goal.TextTransparency = 1
local tween = TweenService:Create(notifier, tInfo, goal)
--//Script
xpEvent.OnClientEvent:Connect(function(xpAmount)
print(xpAmount.."xp gained by ".. game.Players.LocalPlayer.Name) --//Prints
notifier.Text = tostring(xpAmount)
notifier:TweenPosition(UDim2.new(1, 0,-0.829, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 0.5)
wait(1)
tween:Play()
notifier.Position = UDim2.new(0.25, 0,-0.829, 0)
repeat
notifier.TextTransparency = 0 --//Fsr doesn't change it back.
until notifier.TextTransparency
print("XP transition DONE!!") --//Prints
end)
Thank you for your time and I hope you have an answer to this question. Any help is appreciated.

1 comment
I'm not the best at scripting I'm new here, but try using breakpoints to figure out the line that it stops at