Hello.
What is it?
This is a Random Position Module. Easily replacing the old fashioned way of changing part’s position to a random position. Instead of getting their X,Y, and Z values, you can create a part, and the module will automatically choose a random position inside the part. Its a really simple code, but it saves the effort of doing the math and such.
how to use it
First, you require the Module. Its recommended the Module is placed in ReplicatedStorage, or Server Script service. Here is how you can require the module if its in ReplicatedStorage
local RandomPositionModule = require(game:GetService("ReplicatedStorage"):WaitForChild("RandomPositionModule"))
and then to use the module, you just call the Module, and then put the 2 parameters. The first is which part will contain the random Positions, and second is which part will go to a random Position.
This is done like so.
local RandomPositionModule = require(game:GetService("ReplicatedStorage"):WaitForChild("RandomPositionModule"))
RandomPositionModule:RandomPosition(workspace.RandomPositionArea,workspace.Part)
This module is INCREDIBLY simple. Yet very useful. Here is the link to grab it:
https://www.roblox.com/library/6060353074/RandomPositionModule
If you find any issues, or want to tell me and recommendations, just Reply.