Hey! I’m a newbie when it comes to scripting, so I made a script as a child of a part,
and I made it so that if it’s touched ,
it clones a mesh (in replicatedstorage ) to workspace but it seems to not work,
i’ve made the script check if a humanoid touched it,
but doesnt work. Please help!
script:
script.Parent.Touched:Connect(function(hit)
if hit.Parent == "Humanoid" then
local replicated = game:GetService("ReplicatedStorage")
local clone = replicated.TrapWall:Clone()
clone.Parent = workspace
end
end)
here are screenshots:
and here is the mesh in replicatedstorage.