Z4Zy Posted September 26, 2018 Share Posted September 26, 2018 Hi ! Can you tell me a way to get a random player among players inside a col ? [ col refers to an area created by "createColSphere" function. ] "getRandomPlayer" function can't be use since it choose a random player from all players in the server. Any other way ? Link to comment
N3xT Posted September 26, 2018 Share Posted September 26, 2018 (edited) tables getElementsWithinColShape math.random Edited September 26, 2018 by N3xT 2 Link to comment
Moderators IIYAMA Posted September 26, 2018 Moderators Share Posted September 26, 2018 local playerTable = {} local player = playerTable[math.random(#playerTable)] https://stackoverflow.com/questions/2988246/choose-a-random-item-from-a-table As extend of N3xT his comment. 1 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now