Загрузка...

Day 7 scripting your roblox ideas into roblox studio. #lua #roblox #robloxscript #robloxscripting

-- For drag parts the only thing you have to do to get it like I did is insert a normal part into the workspace and add a DragDetector when you've done that set the DragStyle to TranslateViewPlane (you can choose between the other options as well)

PartSpawnerScript:
-- Normal script inside ServerScriptService

local Debris = game:GetService("Debris")

local bricks = {}

local function SpawnPart()
local Newpart = Instance.new("Part")
Newpart.Size = Vector3.new(2, 3, 1)
Newpart.Color = BrickColor.Random().Color
Newpart.Anchored = false
Newpart.CanCollide = true
Newpart.Position = Vector3.new(
math.random(-50, 50),
100,
math.random(-50, 50)
)

Newpart.Parent = workspace


Newpart.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid.Health = 0
end
end)


Debris:AddItem(Newpart, 600)

table.insert(bricks, Newpart)


Newpart.Destroying:Connect(function()
table.remove(bricks, table.find(bricks, Newpart))
end)
end
while true do
if #bricks --(angled bracket here (less than) ) 10 then
SpawnPart()
end

task.wait(60)
end
#lua #roblox #robloxscript #robloxscripting #robloxstudio

Видео Day 7 scripting your roblox ideas into roblox studio. #lua #roblox #robloxscript #robloxscripting канала DogeDaScripter
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять