#parts that i have modeled randomly spawn around the map.
1 messages · Page 1 of 1 (latest)
make an async math.random function/method that does it and just destroy after task.delay
too busy rn sry
You can use debris instead of destroy after task.delay, its more better like that
could you help me with the script?
i knew some1 will spawn to say that shi
** You are now Level 2! **
I mean, im just giving an advice, take it or not, whatever
Uh
Dont you know how to script?
Man i suggest you learn the basics, cuz thats really easy trys @stray cedar
ok
yeah ik, tho some would say debris is worse
nope not at all
lol
trying to make a trash collecting simulator
I think every dev should maybe have a lil bit of scripting basics
Want a playlist?
To know where to start
i know how to spawn in blocks and change them with scripts
i also need help with a data store
sure
This guy explains well :
https://youtube.com/playlist?list=PLySGFpzjXDm7kDBhDtT6XzmP3DoB6Zhhw&si=le7g3_ZG2RvnfLOZ
There is a simple code to generate random
local botebasura = game.ReplicatedStorage.botebasura
local area = workspace.estacion.Model.partes.pisoestacion
for i = 0, math.random(1,5) do
local botebasuraClone = botebasura:clone()
local x = math.random(area.Position.X - area.Size.X/2, area.Position.X + area.Size.X/2)
local y = (area.Position.Y + area.Size.Y/2)
local z = math.random(area.Position.Z - area.Size.Z/2, area.Position.Z + area.Size.Z/2)
local rotacionHorizontal = CFrame.Angles(math.rad(90), 0, 0)
local rotacionchafa = CFrame.Angles(0, 0, math.rad(math.random(0, 360)))
botebasuraClone:SetPrimaryPartCFrame(CFrame.new(x,y,z) * rotacionHorizontal * rotacionchafa)
botebasuraClone.Parent = workspace
end
aight ty
thanks
what is botebasura
** You are now Level 2! **
@prisma jetty
the model
oh so i change that to the name of my model
oh ok
You can name it whatever you want
this is the important thing: game.ReplicatedStorage.botebasura
ok
i just added this script in and its not seeming to work
cuz its not a copy paste script, u are supposed to adapt,,,
just go watch the tutorials
will save u time and headache