I have this script:
while wait() do
local distance = math.floor((player.Character:WaitForChild("HumanoidRootPart").Position - mouse.Hit.p).magnitude)
if ibreak and distance <= 15 then
if mouse.Target.Name == "Dirt" or mouse.Target.Name == "Grass" then
clone.Name = player.Name.."'s plant."
ibreak = false
canbeclicked = true
ClickedButton = false
MMN()
break
end
end
if mouse.Target ~= nil then
clone.Parent = game.Workspace
local distance = math.floor((player.Character:WaitForChild("HumanoidRootPart").Position - mouse.Hit.p).magnitude)
if mouse.Target.Parent.Name ~= script.Parent.Name then
clone:MoveTo(mouse.Hit.p)
end
end
if Canceled then
clone:Destroy()
print("Clone's gone!")
Canceled = false
end
end
I get a error everytime when I click to Cancel and to destroy the model that says:
17:38:34.699 - The Parent property of StarterFlower is locked, current parent: NULL, new parent Workspace 17:38:34.700 - Stack Begin 17:38:34.701 - Script 'Players.wilsonsilva007.PlayerGui.Inventory.Background.Starter_Flower.ImageBackground.Image.StarterFlower.LocalScript', Line 88 17:38:34.702 - Stack End
How do I fix this?

2 comments
You know this was 1 year ago right? xD Anyways I done that 1y ago and it worked so u get an accepted answer.
xd ok