Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does my part get destroyed and roblox does not display the error?

Basically, I'm trying to make an object disappear when it touches a certain part. Whenever it touches it, it doesn't work. I used a print script to see if there's an error. However, my script prints out the error message but roblox doesn't. How do I get this to destroy?

Script:

script.Parent.Yummy.Touched:Connect(function(eaten)
	if eaten.Parent.Name == "Eat" then
		script.Parent:Destroy()
	else
		print("error!")
	end
end)

1 answer

You need a destroy the script

5 comments

0

????

0

what are you trying to solve? i dont know what when it touches and object the object dissapears mean

0

so basically when a part touches a certain part, it gets destroyed

0

if it prints then it probably means it works

0

if it prints then its not working

This discussion is preserved as it was. New answers, comments, and votes are closed.