Script Roll Dice


Hello everyone !

I’m looking for a dice roll script. Or an idea how to do it.
The objectif would be with a chatcommand like / rolldice make a dice roll in chatbox for near players

Sorry for my English, I am French! :blush:
Thank you


Simply use math.random(num) to choose a random number then send a message in chat

also moved to #development:scripts


math.random(lower, upper) creates a random number between lower and upper.


This should do the trick. But please use it to learn, not to just copy and paste and forget about it

RegisterCommand("rolldice", function() 
	num = math.random(1,6)
	TriggerEvent("chatMessage", "Dice Gods", {255,0,0}, "You rolled a ^2"..num)
end, false)


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.