When Touched Parts they on air

  1. i made a attack for my game and i wanted to change particles to parts like magma in one piece games
    https://cdn.discordapp.com/attachments/963631310302240812/965183086130257940/f4c14fcd2e3226e716b2fa212bcfc387.mp4

so here is problem
https://gyazo.com/494f518a09103446b2469a2b25749583
its spawning on air but on client it shows not. its not a local script

here is script

script.Parent.Touched:Connect(function(hit)
	if hit.Name == "Baseplate" then
		script.Parent.Anchored = true
		for i = 1,2 do
			script.Parent.Size = script.Parent.Size - Vector3.new(0,2,0)
			wait(0.01)
		end
		script.Parent.Anchored = true
	end
end)

i tried to change “if hit.name”, i tried to change spawn script, i tried everyting that i know(i’am not very good at scripts)

for i = 1,10 do
		local g = script.Parent.Attack.Value:Clone()
		g.Parent = game.Workspace
	g.MainPart.Position = script.Parent.Position
	g.MainPart.AssemblyLinearVelocity = Vector3.new(math.random(-1,3)*math.random(19,20),100,math.random(-1,3)*math.random(19,20))
	wait(0.18)
end

Can you help me pls with this
i don’t want you to write full script just need a hint.
Lua

The problem could be that you had not set a spawn point for them, you can try placing them in replicated storage and cloning them. you can add a position where they start and then continue the script.
The problem could also be the anchor, you had kept the part anchored at the beginning and you thought that when the part lands it should be anchored but instead it is anchored in air.