Simple module that makes your parts move from workspace.GlobalWind
I literally spent around 5-10 minutes creating it, dont expect it to be hard.
Preview:
Module
local parts = {}
local mod = {}
function mod:AddPart(part:Instance, multiplier:number)
if not parts[part] then
parts[part] = (typeof(multiplier) == 'number' and multiplier) or 1
end
end
function mod:RemovePart(part:Instance)
if parts[part] then
parts[part] = nil
else
return false
end
end
function mod:GetAffectedParts()
return parts
end
game:GetService('RunService').Heartbeat:Connect(function(dt)
for i, v in pairs(parts) do
if i then
i.Velocity += workspace.GlobalWind*dt*v
end
end
end)
return mod
Usage:
Init the module local wind = require(Path_To_Module)
Functions: wind:AddPart(<BasePart>, <Force Multiplier | defaults to 1>) Makes part move wind:RemovePart(<BasePart>) Does the opposite wind:GetAffectedParts() Returns a list of every affected part, looks like:
I was thinking about making something like this too, great job!
Also you should make this into a model that people can grab & you can update if you choose to add more features later down the line.
Thanks for this cool resource