Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I don't know why the third script ain't working if you could help me? I would appreciate it!

First script:~~~~~~~~~~~~~~~~~ game.Players.PlayerAdded.connect(function(Player) local Data = Instance.new("IntValue",Player) Data.Name = "Data" local XP = Instance.new("IntValue",Data) XP.Name = "XP" local Level = Instance.new("IntValue",Data) Level.Name = "Level" Level.Value = 1 XP.Changed:connect(function()XPChangingFunction(Player,XP,Level)end) end) function XPChangingFunction(Player,XP,Level) if XP.Value >= Level.Value * 150 then XP.Value = 0 Level.Value = Level.Value + 1 end end

Second script: 

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 Mathematics = (XP / MaxXP) script.Parent.TweenSize(UDim2.new(Mathematics,0,1,0),'Out','Quad',25)

end

third script:

while true do wait()

print (Value = Level)

end


I know the third one is trash.

1 comment

0

Put your code in between the ~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~

1 answer

In your third script, Value and Level are not defined, and that is why it will not work. It is a convention (a standard) for all programmers to define variables like that.

This discussion is preserved as it was. New answers, comments, and votes are closed.