Well, i've learned to do Keycodes. so i wanted to make a game but playable with scripts. So basically i want the value to have more numbers everytime you press the keycodes. But when i put the "+" on the line:16 it had the 'red ~' basically means it's invalid. so i wanted to ask if there's any way.

The codes:

--// map //--
local UserInputService = game:GetService("UserInputService")
local value = 0
local value1 = 0
local m = game.Players.LocalPlayer:GetMouse()
print("$:".. value)
print("a:".. value1)
print("W-G")
--// config //--
m.KeyDown:Connect(function(k)
	k = k:lower()
	if k=="r" then
		print("$:".. value)
        print("a:".. value1)
        print("W-G")
        value=1
	end
end)

2 comments

0

Can you specify what you`re meaning by "more numbers"?

0

i mean by getting some more numbers when i press the k, ETC: 1+1 = 2. that's what i meant