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

Admin Command to update leaderstats value [?]

I got a script from here and edited a bit but still doesn't work..

	game.Players.PlayerAdded:Connect(function(player)
	local command = "!add"
	local intValue = path
	
	local staff = {1139304898, 2, 3}
	
	local value2 = player.leaderstats.Strength
	player.Chatted:Connect(function(msg)
		if staff[player.UserId] then
			if msg:sub(1, command:len()):lower() == command then
				local num = string.match(msg, "%d+")
				if not num then
					print"error"
				else
					value2.Value += num
				end
			end
		end
	end)

I'm trying ingame to do !add 124213131 or !add 1 and it doens't work

1 answer

Your intValue is supposed to be the path to the int value that's why its not working

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