Workspace

Workspace is the main area where all the physical parts of your game exist. This includes objects like characters, buildings, tools, and other items that players can see and interact with.

It acts like the 'world' of your game, containing all the items and environments that make up the game. Both the server and the players' computers (clients) can see and interact with the objects in Workspace.

Image 1
Roblox Studio
local workspace = game:GetService("Workspace")

local cube = workspace:FindFirstChild("Cube")

if cube and cube:IsA("Part") then
    print("Found the part named 'Cube'")
    cube.BrickColor = BrickColor.new("Bright red")
else
    print("Part named 'Cube' not found in the workspace or it is not a Part")
end
Image 1
Image 2
Roblox Studio

If you found this tutorial helpful and would like to support my work, please consider buying me a coffee.

Thank you very much for your support!

Buy me a coffee