When I change the XP value, the level up bar doesn't move at all. -Here is the Script for the frame.
repeat wait() until game.Players.LocalPlayer
local Player = game.Players.LocalPlayer
local Data = Player:FindFirstChild("Data")
local XP = Data.XP
local Max_XP = 10000
while wait() do
local XPMat = ( XP.Value / Max_XP )
script.Parent:TweenSize(UDim2.new(XPMat,0,1,0),"Out","Quad",.25)
end
-Here's the script for ServerScriptService
local Max_XP = 10000
local Max_Level = 150
game.Players.PlayerAdded:connect(function(Player)
local Data = Instance.new("IntValue",Player)
Data.Name = "Data"
local XP = Instance.new("IntValue",Data)
XP.Name = "XP"
XP.Value = 100
local Level = Instance.new("IntValue",Data)
Level.Name = "Level"
Level.Value = 1
local Tries = Instance.new("IntValue",Data)
Tries.Value = 10
Tries.Name = "Tries"
XP.Changed:connect(function()
XPChange(Player,XP,Level)
end)
end)
function XPChange(Player,XP,Level)
if XP.Value >= Max_XP and Level.Value <= Max_Level then
XP.Value = 0
Level.Value = Level.Value + 1
else
return false;
end
end
-My first script for Frame attempt
while true do
wait()
local XP = script.Parent.Parent.Parent.Parent.Parent.Data.XP.Value
local MaxXP = script.Parent.Parent.Parent.Parent.Parent.Data.Level.Value*150
local math = ( XP / MaxXP )
script.Parent:TweenSize(UDim2.new(math,0,1,0),"Out","Quad",.25)
end

10 comments
The first script is a local script correct ?
And remember to change value with server.
this guy clearly diddnt script it
also, don't use the parent argument of Instance.new
this script is from a tutorial
oof. can you just fix the script for me.
show that you attempted first if we just give you the fixed script we're not helping you
I have to mention that I got 90% of the script from a youtube video. Im trying to learn to script.
Downvoted for saying "can you just fix the script for me." And YouTube tutorials suck. They teach bad code.
what is downcoded