My random weapon script doesn't work

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I want to making the script work but somehow I cant make it work.

  1. What is the issue? Include screenshots / videos if possible!

it says the interval is empty

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I tried putting the script into serverscriptservice and workspace

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

If somebody can solve problem thank you!

-- This is an example Lua code block

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Does this script run instantly when your game starts? If so, there are no players when the game first starts. There for that is why the interval is empty.

Try adding a delay before running the script, or loop until there are at least 2

1 Like

it does run instantly and also i put a wait() on the script and an if statement to know if the number of players is greater than 2 or equal 2

thank you for helping me!

If you are trying to check if it is greater than or 2 or equal 2, you would do >=. == only means equal to 2.

1 Like

Thank you for helping me fix the scripts had problems with now my script finally works :smiley:

No problem, I would recommend marking the reply that helped you the best as a solution so it would be easier for other people having a similar issue.