What do you want to achieve? Keep it simple and clear!
I want to learn how to make so that every player gets the same number.
What is the issue? Include screenshots / videos if possible!
The issue is everyone gets a random number.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried doing it myself, it didn’t work I found an old old old forum that for some reason didn’t work.
Why don’t you use their UserId?
From what I am guessing he wants to get a random number that is the same for everyone and are all client sidedely.
So as far I now, if u use math.randomseed(5) u will get once calling math.random a random and same number for every client
Random objects and :NextInteger() with an identical/per session seed.
Just utilize math.random() on the server and then through remote events you can do :FireAllClients() so that all the players in the game receive the same number. Something like this would do well:
-- Server local event = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent") local num = math.random(1, 100) event:FireAllClients(num) --Client (local script) local event = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent") event.OnClientEvent:Connect(function(num) print(num) end)
I need to type this so I can send this reply.