function onTouched(part)
	part.Anchored = false;
	part.CanCollide = false
end

script.Parent.Touched:connect(onTouched)

The scripts parent is part, and when the part touches another part, it's supposed to make the touched part fall, then destroy itself. But it doesn't work. I have more scripts inserted in that part:

while true do
	wait()
	script.Parent.CFrame = script.Parent.CFrame + Vector3.new(0,.1,0)
end

and

while true do
	wait(5)
	local clone = script.Parent:Clone()
	clone.Parent = workspace
	clone.Transparency = 0
	clone.CFrame = workspace.PartP.CFrame + Vector3.new(-.5,1,0)
end

All the scripts work except for the first one.

3 comments

0

What happens when you try to run the script? Does it run just fine or does an error appear in output?

0

Nothing is in the output

0

When it touches a part nothing happens.