Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago

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.

0
Put your code in between the ~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ hellmatic 1523 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

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.

Ad

Answer this question