How cani fix tween script?

So in my script im having tweening problems and some other scripting problems, how do i fix some of the problems?

local player = game.Players.LocalPlayer
local CurrentExp = player:WaitForChild("leaderstats").Exp
local MaxExp = player:WaitForChild("leaderstats").ExpToLevel

local Gui = script.Parent
local Exterior = Gui:WaitForChild("BackFrame")
local label = Gui:WaitForChild("TextLabel")
local Bar = Gui:WaitForChild("Expbar")

script.Parent.TextLabel.Text = CurrentExp.Value.."/"..MaxExp.Value
CurrentExp.Changed:Connect(function()
	if CurrentExp.Value >= MaxExp.Value then
		Bar.Size = UDim2.new(CurrentExp.Value/MaxExp.Value,0,1,0)
		wait(0.5)
		CurrentExp.Value = 0
		Bar.Size = UDim2.new(CurrentExp.Value/MaxExp.Value,0,1,0)
	else
		Bar.Size = UDim2.new(CurrentExp.Value/MaxExp.Value,0,1,0)
	end
end)

Bar.Size = UDim2.new(CurrentExp.Value/MaxExp.Value,0,1,0)

You need to specify what the issue is firstly

Ok here are some pictures
Screen Shot 2021-03-09 at 7.06.55 AM Screen Shot 2021-03-09 at 7.07.05 AM Screen Shot 2021-03-09 at 7.07.11 AM
The exp gui says 0/0 but my leaderstats exp value isn’t

I think that’s due to some other script , do you have any other scripts that change the Value of CurrentExp?

First of all: you said you had tweening issues. You never even called :TweenSize() or :TweenPosition(). You never mentioned anything about tweening in the script you showed us…

Oh i thought this script was related to tweening, im sorry

no? all i have is a script incrementing some more exp

I’m guessing this is in a localscript, I think the issue is that the server cannot detect if the CurrentExp value was changed, that or something else is causing it. Are you sure nothing else is increasing the value or anything that is related to the CurrentExp is messing something up?

well, in a serverscript, i added a while true do loop and every 3 seconds it increments more exp

Could you go into playtest mode and show us the output so we can see if there are any errors?


Thats all that’s there is in the output, the require thing has always been there

Its because you never tell the script to change the text? You only tell it to do it once, and its outside the .Changed event. Do something like this:

script.Parent.TextLabel.Text = CurrentExp.Value.."/"..MaxExp.Value
CurrentExp.Changed:Connect(function()
script.Parent.TextLabel.Text = CurrentExp.Value.."/"..MaxExp.Value
	if CurrentExp.Value >= MaxExp.Value then
		Bar.Size = UDim2.new(CurrentExp.Value/MaxExp.Value,0,1,0)
		wait(0.5)
		CurrentExp.Value = 0
		Bar.Size = UDim2.new(CurrentExp.Value/MaxExp.Value,0,1,0)
	else
		Bar.Size = UDim2.new(CurrentExp.Value/MaxExp.Value,0,1,0)
	end
end)

A bit off topic, what is the load character plugin made by? I have load character and it never gives me a require error. Did you get a fake version of the plugin which has a backdoor?

I got the plugin from AlreadyPro the new Thanks, that works

Are you sure? This looks like a backdoor module to me, and it isn’t even uploaded by AlreadyPro. Backdoors are usually named like this, with random characters. Here was the module:

https://www.roblox.com/library/6238063742/eg45reg
Also, if my solution worked, just mark my comment solution incase anyone else has this issue.

They are also in one of these groups that have a name that looks like the real creator. It is to trick people into getting a backdoor.

https://www.roblox.com/groups/8970831/AlreadyPr#!/about

Ive never gotten that plugin before, all i have is moon animator, model resize

oh wait i have that one Lemme remove it

Thats a backdoor / fake plugin, uninstall it. I can link the real plugin here:

While it isn’t the pro version, this works just fine. It imports characters from names. What else would it need?

yes, i had that plugin but i thought alreadypro made a free pro version :laughing: