Roblox Summer 2024

When:

Wednesdays 10:00AM - 12:00PM Pacific

Where:

Join the Zoom

What:

Download Roblox

Missed this week?

Jump to recap

Week 1

1

Download Roblox Studio

2

Click on "Start Creating"

3

Join Zoom

4

Terrain Generation

5

Publishing

Week 2

1

Create project

2

Create environment

3

Design level

Week 3

1

Put a hole in a part

2

Damage block

3

Damage block code

                    
local damagePart = script.Parent

local function onPartTouch(otherPart)
    local partParent = otherPart.Parent
    local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")

    if humanoid then
        humanoid.Health = 0
    end
end

damagePart.Touched:Connect(onPartTouch)

                    
                

Week 4

1

Coin Collection

2

Coin Collection Code

                    
local Workspace = game:GetService("Workspace")
local Players = game:GetService("Players")

local coinsFolder = Workspace.Coins
local coins = coinsFolder:GetChildren()

local COOLDOWN = 10

local function onCoinTouched(otherPart, coin)
	if coin:GetAttribute("Enabled") then
		local character = otherPart.Parent
		local player = Players:GetPlayerFromCharacter(character)
		if player then
			coin.Transparency = 1
			coin:GetAttribute("Enabled", false)
			print("Player collected a coin")
			task.wait(COOLDOWN)
			coin.Transparency = 0
			coin:GetAttribute("Enabled", true)
		end
	end
end

for _, coin in coins do
	coin:SetAttribute("Enabled", true)
	coin.Touched:Connect(function(otherPart)
		onCoinTouched(otherPart, coin)
	end)
end