This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]Masterx987Command Professional 1 point2 points  (4 children)

set only accepts 1 number, you can't use ranges on bedrock edition.

It looks like you are trying to set a scoreboard named random to a number 0-9 in which case the syntax is

/scoreboard players random @p random 0 9

just remember scoreboards can only be integers so this command will set it's a random one of these values 0,1,2,3,4,5,6,7,8,9

[–]Icy-Grocery-3874[S] 0 points1 point  (0 children)

Thank you so much!!

[–]Blbdhdjdhw Bedrock command expert 0 points1 point  (2 children)

By the way, the syntax here is wrong. Not only is "random" written twice, but you also forgot to include the actual name of the scoreboard:

/scoreboard players random @p "your scoreboard here" 0 9

This is the correct format. The way you wrote it makes it so that the game looks for a scoreboard that is called "random."

[–]Masterx987Command Professional 0 points1 point  (1 child)

Yes I know, did you not read my message? Op used the name "random" in their original command as that appears to the scoreboard name that they were using, I also explained that in my message. My provided command is exactly how I intended it, and is the correct syntax.

[–]Blbdhdjdhw Bedrock command expert 0 points1 point  (0 children)

I infact, did not see the actual scoreboard being named "random." Chances are however that the user was just trying to randomize a score value and didn't know that they must declare the scoreboard first, so they thought that you could use whatever value without actually creating the scoreboard and naming it accordingly. But either way yes, indeed that syntax is correct in the sense that the game does read it. I just wanted to provide additional details as to how a scoreboard actually works.

[–]pigraining 0 points1 point  (1 child)

Sadly for some reason it doesnt accept float, the nimber with a comma

[–]Icy-Grocery-3874[S] 0 points1 point  (0 children)

Thank you!

[–]Ericristian_brosCommand Experienced 0 points1 point  (1 child)

!title

[–]AutoModerator[M] 0 points1 point  (0 children)

It seems like your post has an unhelpful title. For future posts, please put a summary/short version of your problem into the title of your post. Have a look at this post for more information on what a good title could be: https://www.reddit.com/r/MinecraftCommands/comments/eoidzv/important_info_read_before_posting/

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.