I'm trying to make it so when you touch the gold coin, the gold coin well get smaller and smaller and get removed.
local GoldCoin = script.Parent
GoldCoin.Touched:Connect(function(hit)
local p = hit.Parent:FindFirstChild("Humanoid")
if p ~= nil then
while wait(0.1) do
GoldCoin.Mesh.Scale = GoldCoin.Mesh.Scale - Vector3.new(-0.5, -0.5, -0.5)
end
GoldCoin:remove()
