I made a block placing script where the player can place a part, but the part just stays there forever! I need to make it so that the part will disappear after let's say 10 seconds, I have tried so many ways and non of them work, I really am stumped and require help
function place()
p = Instance.new("Part")
p.Parent = game.Workspace
p.Name = game.Players.LocalPlayer.Name
p.BrickColor = game.Players.LocalPlayer.PlayerGui.Vectors.Color.Value
if game.Players.LocalPlayer.PlayerGui.Vectors.Anchor.Value == 1 then
p.Anchored = true
elseif game.Players.LocalPlayer.PlayerGui.Vectors.Anchor.Value == 0 then
p.Anchored = false
end
p.Size = game.Players.LocalPlayer.PlayerGui.Vectors.VValue.Value
p.Position = game.Players.LocalPlayer.Character.Humanoid.TargetPoint
end
script.Parent.Activated:connect(place)

2 comments
Have you tried using wait(10) p:Remove()? if not, try p.Parent = nil
Remove() is deprecated boy...... What year do you live on???????