Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago
Edited 3 years ago

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

Log in to vote
0
Answered by 3 years ago

You need a destroy the script

0
???? xbendaiialt 44 — 3y
0
what are you trying to solve? i dont know what when it touches and object the object dissapears mean momgggbghghghghg 50 — 3y
0
so basically when a part touches a certain part, it gets destroyed xbendaiialt 44 — 3y
0
if it prints then it probably means it works momgggbghghghghg 50 — 3y
0
if it prints then its not working xbendaiialt 44 — 3y
Ad

Answer this question