im trying to create a touched event, so whenever it is touched, it clones a part named "Shockwave" in a certain folder with its parent as ReplicatedStorage. However, it doesnt clone the part and there's no output in the console. Here's my code:
local function onTouched(hit)
local rep = game:GetService("ReplicatedStorage")
local folder = rep:WaitForChild("DFModels")
local shock = folder:FindFirstChild("Shockwave")
shock.Parent = game.Workspace
shock.Position = Vector3.new(script.Parent.Position.X, 1, script.Parent.Position.Z)
for i=6, 30, 2 do
shock.Size = Vector3.new(i,1,i)
wait(.1)
end
for i=0, 1, .1 do
shock.Transparency = i
wait(.1)
end
shock:Destroy()
end
script.Parent.Touched:Connect(onTouched)
I hope someone would be kind enough to help :D

2 comments
I saw your other comment about not doing :Clone(), have you changed the parent? If the item is in ReplicatedStorage, it won't be visible.
im making a clone then making the clone's parent to workspace. my other model in repstorage works fine, so idk whats wrong with this one