My goal for today is to make a simple system that removes the ability of other players to touch each other’s builds. I’ve already created a system that puts each player’s builds in a private folder. But others can still select them.
– The system that creates the main WORKSPACE folder
--Stores all parts in this folder-- local serverSide = Instance.new("Folder") serverSide.Name = "WORKSPACE" serverSide.Parent = game.Workspace --Adds folder for blocks-- game.Players.PlayerAdded:Connect(function(plr) if workspace:FindFirstChild(plr.Name) then else local folder = Instance.new('Folder') folder.Name = plr.Name folder.Parent = serverSide end end) --Delete the block's when someone leaves the game-- game.Players.PlayerRemoving:Connect(function(plr) if serverSide:FindFirstChild(plr.Name) then serverSide:FindFirstChild(plr.Name):Destroy() end end)
– The part of my create part function that adds build to the folder
function CreatePart(Type) -- Send the creation request to the server local Part = Core.SyncAPI:Invoke('CreatePart', Type, CFrame.new(Core.Mouse.Hit.p), Core.Targeting.Scope) Part.Name = game.Players.LocalPlayer.Name.."'s Part" Part.Parent = workspace["WORKSPACE"]:FindFirstChild(game.Players.LocalPlayer.Name)