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

Data doesn't appear in Player1 when I use this 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

This whole thing is in Server Storage under the name System

1 comment

0

Woah, that's really messy. Please put the code in a code block.

1 answer

Ok, even though the code part is really messy. Since that's not the problem, I'll give you the solution: You said the script is in ServerStorage, well scripts aren't run from that directory. ServerScriptService is your best option to run the scripts from, as clients don't have access to it, so therefore, can't disable the script.

2 comments

0

Thank you and BTW I just started learning..... a week ago.

0

If this worked, please vote it up and accept it as the answer so people know it has a valid answer.

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