local IceCube = script.Parent
local function IceInYaFace()
wait(1)
for NumberOfIce = 1, 50 do
local IceBlocks = Instance.new("Part", game.Workspace)
IceBlocks.Anchored = false
IceBlocks.BrickColor = BrickColor.new("Pastel Blue")
IceBlocks.Material = Enum.Material.Ice
IceBlocks.Size = Vector3.new(2, 1, 1.25)
IceBlocks.Position = Vector3.new(86, 15, 48.625)
end
end
IceCube.Touched:Connect(IceInYaFace())
So I wanted to make a function that creates 50 ice blocks 1 sec after the script.Parent/IceCube gets touched but when I play it just spawns 50 ice blocks after 1 second even though I haven't touched the script's parent. I would appreciate an explanation of the error and how to fix.

1 comment
It may fix the problem, I dont know what your iceblock looks like or it's surroundings. It is very possible that this change fixes your problem.