I was messing around with Region3 since I'm fairly new, and I stumbled upon this error: "CFrame can not be assigned to" -- line 4 in this code:
local pos1,pos2 = Vector3.new(0,0,0), Vector3.new(20,20,20) local R3 = Region3.new(pos1,pos2) game:GetService("RunService").Stepped:Connect(function() R3.CFrame = plr.Character.Torso.CFrame + Vector3.new(0,20,20) for _,Part in pairs(game.Workspace:FindPartsInRegion3(R3,workspace.Base,math.huge)) do Part.CanCollide = false Part.Position = Part.Position + Vector3.new(math.random(1,10),math.random(1,5),math.random(1,10)) end end)
(yes, I do have a plr variable." Any help is appreciated in advance!
I've never tried anything like this but I think know the problem. See if this works
local pos1,pos2 = Vector3.new(0,0,0), Vector3.new(20,20,20) local R3 = Region3.new(pos1,pos2) game:GetService("RunService").Stepped:Connect(function() R3.CFrame = plr.Character.Torso.CFrame + CFrame.new(Vector3.new(0,20,20)) for _,Part in pairs(game.Workspace:FindPartsInRegion3(R3,workspace.Base,math.huge)) do Part.CanCollide = false Part.Position = Part.Position + Vector3.new(math.random(1,10),math.random(1,5),math.random(1,10)) end end)