local Button = script.Parent.Button2
local Drop = script.Parent.Drop
local Ready = true
function MakeBlock()
if Ready then
Ready = false
local Block = Instance.new("Part", game.Workspace.Cake)
Block.CFrame = Drop.CFrame
Block.Size = Vector3.new(3, 1.2, 3)
Block.Material = Enum.Material.SmoothPlastic
Block.BrickColor = BrickColor.new("Pastel brown")
Block.Name = "Batter"
game.Debris:AddItem(Block, 400)
wait(3)
Ready = true
end
end
Button.ClickDetector.MouseClick:Connect(MakeBlock)
This script allows a button to create a part, which is named Batter, then after 400 seconds, deletes it.
I need to know how to make the script allow someone to become the owner of the created part when they touch it.
I've tried many things, but they've all failed.
My main goal with my game is to do something similar to what Lumber Tycoon 2 does with chopped down trees. (Getting money from a part touching another part)

1 comment
Thank you :)