I am trying to make a console command that rolls a number between 0 and 100 for my own RP gamemode. It is supposed to look like this in chat:
Gatekeeper828 has rolled a 75 out of 100.
Whenever I type “roll” in my console, it says it’s an unknown command. I looked at the wiki and even tried the example yet it did not work.
Here’s the code:
function roll() Chat.Add(Color(0,0,255), player:GetName().." has rolled "..math.random(0, 100).." out of 100." ") end concommand.Add( "roll", roll ) end
Also, is there anyone who could tell me where I would put this script if I wanted it in a gamemode? Thanks in advance.