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

IntValue isn't setting when created?

Hello! I've been making an EXP system, with three values (1st value as Exp, 2nd one as Level and 3rd one as MaxExp) and it's not going very smoothly. Every time I test, the IntValue called "MaxExp" doesn't set to what I intended. Here's a snippit of my code of Level and MaxExp.

game.Players.PlayerAdded:Connect(function(plr)
	local leaderstats = Instance.new("IntValue",plr)
	leaderstats.Name = "leaderstats"
	local money = Instance.new("IntValue",leaderstats)
	money.Name = "Credits"
	local level = Instance.new("IntValue",leaderstats)
	level.Name = "Level"
	level.Value = 0
	local exp = Instance.new("IntValue",leaderstats)
	exp.Name = "Experience"
	local maxExp = Instance.new("IntValue",leaderstats)
	maxExp.Name = "MaxExp"
	maxExp.Value = 100 -- Not setting
end)

Any help please?

P.S, I'm new to the forum, this is my first post.

2 comments

0

um I think leaderstats is supposed to be a folder and not an intvalue, if that does not work I’ll think of a way

0

No no, it's working fine, but the value isn't doing anything. I think it may be internet? I'm not entirely sure.

2 answers

Strange, seems to work on my end. This may have to do with slow internet, slow computer, or high latency. Try connecting to ethernet.

1 comment

0

Er, it doesn't work.

If you want this to show on a leaderboard via top right, change line 2 from "IntValue" to "Folder", but other than that it should work.

1 comment

0

Nope. Doesn't work.

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