I’ve made a module to form craters easily with customizable settings.
Example:
Test file:
Crater_Test.rbxl (57.7 KB)
I’ve made a module to form craters easily with customizable settings.
Example:
Test file:
Crater_Test.rbxl (57.7 KB)
I don’t think I’ll use it but very interesting, great job!
This will come handy for something I’m currently doing, good job!
For some reason, the module never finish loading
My script stops when require it. (and sometimes it appears this error)
It’s a server script, that module just works on local script?
The module only runs on the client, as all effects such as this should be handled client-side.
Try a RemoteEvent with :FireAllClients() if you need to activate this from the server.
--server
game.ReplicatedStorage.CraterEvent:FireAllClients({
Radius = 10;
rockSize = 2.5;
Position = Vector3.new(0,0,0); -- example, replace with whatever position you need
})
--client
local Crater = require(<crater module path>)
game.ReplicatedStorage.CraterEvent.OnClientEvent:Connect(function(tbl)
Crater.formCrater(tbl)
end)
New functionality added: Passing settings to .formCrater
as arguments to use the setting for this specific crater.
Crater.formCrater({
Position = Vector3.new();
Radius = 10;
rockSize = 2.5;
hasDust = false;
doFlyingDebris = false;
})
-- This will create a crater with no dust and no flying debris without effecting your global default settings.
3 new settings have been added, fadeInTime
, fadeOutTime
, and forceNumberDebris
.
fadeInTime
determines how fast your craters come out of the ground.
fadeOutTime
determines how fast your craters sink back into the ground after timeBeforeRemoval
has passed.
forceNumberDebris
will allow you to specify an exact number of parts to create for the crater.