#parts that i have modeled randomly spawn around the map.

1 messages · Page 1 of 1 (latest)

stray cedar
#

does anyone know how to script that it makes parts randomly spawn and despawn in places around the map

vernal field
#

make an async math.random function/method that does it and just destroy after task.delay

stray cedar
#

uhhh

#

idk how to do that lol

#

@vernal field \

#

wanna help?

vernal field
#

too busy rn sry

stray cedar
#

ok all good

#

could you some time today?

open shale
stray cedar
vernal field
inland swallowBOT
#

studio** You are now Level 2! **studio

open shale
open shale
#

Dont you know how to script?

#

Man i suggest you learn the basics, cuz thats really easy trys @stray cedar

vernal field
stray cedar
vernal field
#

lol

stray cedar
#

trying to make a trash collecting simulator

open shale
#

Want a playlist?

#

To know where to start

stray cedar
#

i also need help with a data store

stray cedar
open shale
prisma jetty
# stray cedar could you help me with the script?

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
inland swallowBOT
#

studio** You are now Level 2! **studio

stray cedar
#

@prisma jetty

prisma jetty
stray cedar
prisma jetty
#

hm

#

no, i mean

#

thats the variable

stray cedar
#

oh ok

prisma jetty
#

You can name it whatever you want

#

this is the important thing: game.ReplicatedStorage.botebasura

stray cedar
#

i just added this script in and its not seeming to work

prisma jetty
vernal field
#

will save u time and headache