I want to make an interactable grass system which once you walk onto the grass, the parts you walked on disappears, or make a hole in the grass, and once you make 2-3 holes, it fills up again. I currently have this script;
local ins = Instance.new("Part")
ins.Parent = workspace
ins.Anchored = true
ins.CanCollide = false
ins.Size = Vector3.new(4, 1, 4)
ins.Material = "Grass"
ins.Name = "InteractiveGrass"
script.Parent.Parent.Touched:Connect(function(a)
if a.Parent:FindFirstChildWhichIsA("Humanoid") then
local rslt = math.round(a.Position.X/4)
local chsn = rslt*4
ins.Position = Vector3.new(chsn, math.round(a.Position.Y), math.round(a.Position.Z))
if a.Position.Y >= 2 then
ins.Position = Vector3.new(chsn, math.round(a.Position.Y + 1), math.round(a.Position.Z))
end
end
end)
Which does this;
robloxapp-20220628-1443360.wmv (1.5 MB)
The bottom plate labled “Ground” is 1 hole part. The top plate named “Grass” is set to cancollide = false. I want to have the instance.new do this instead of what the video showed;
Any ideas on what to do?
