Hi, I’m making a weather system, with only rain, but I have a big rain part from where the small drops spawn. but Those drops need to be positioned correctly and randomly according to the size of the big rain part, let me know if you know how to do it! I don’t know how to achieve this goal. Thanks
just use this https://www.roblox.com/library/2166774609/Rain-Plugin
I think he might want to make his own rain system, though.
Yeah I wanna make my own, I know about this plugin
Well basically u only want to mess with x and z value.
local part = game.Workspace.myPart local x = part.Size.X / 2 local y = part.Size.Z / 2 while wait(2) do local drop = game:GetService("ReplicatedStorage").Raindrop:Clone() drop.Parent = game.Workspace local rX = math.random(x, -x) local rZ = math.random(z, -z) drop.CFrame = part.CFrame * CFrame.new(rX, 0, rZ) end
Thats just my guess tho, I made this code rn on phone and never tested it out
wait. I want the rain drop to be positioned at the size of THE BIG part from where the drops drop
nvm I misunderstood your post I apologize for that
No it didn’t work, what should I do??
Wait but do u actually have, a part in workspace named myPart and a raindrop in replicatedStorage named Raindrop?
I made it my self, like
local x = rainPart.Size.X / 2 local z = rainPart.Size / 2 local rx = math.random(-x , x) local rz = math.random(-z, x) rainDrop.CFrame = rainDrop.CFrame * CFrame.new(rx, 0, rz)
I customized your code a bit.
rainDrop.CFrame = rainPart.CFrame * CFrame.new(rx, 0, rz)
oops, didn’t realize it, let me fix it.
uhhh, why is still not working.
Raindrop didnt move at all? (30)
It did move. but not correctly like a rain drop
Can you record it? (30charracters)
Yes! Sure, I will do it. The video quality won’t be that good.
robloxapp-20200817-1212549.wmv (497.6 KB)
See it yourself, the rain part is big, but the raindrops aren’t doing well as intended.
Can u show me what u got now? (I mean code)
Sure! Here you go;
local rainPart = workspace.RainPart local x = rainPart.Size.X / 2 local z = rainPart.Size.Z / 2 while true do for i = 1, 10 do local prt = Instance.new("Part", workspace) prt.Anchored = false prt.CanCollide = true prt.Name = "Drop" prt.Material = "Neon" prt.BrickColor = BrickColor.Blue() prt.Size = Vector3.new(0.39, 1.2, 0.3) local rx = math.random(-x , x) local rz = math.random(-z , z) prt.CFrame = rainPart.CFrame * CFrame.new(rx, 0, rz) wait(0.5) end wait(0.5)