Second question of the hour, but now this isn't working.
local function ontouch(part)
if part.Anchored ~= true then
if part.Parent.Name ~= "Bombs" then
wait(math.random(2,6))
part.BrickColor = script.Parent.BrickColor
wait(math.random(2,6))
part:BreakJoints()
end
end
end
script.Parent.Touched:Connect(ontouch)
The error I get is as follows:
Touched is not a valid member of Script
No idea what's going on, help would be useful. Thank you.

4 comments
Is this script inside of another script?
Put the script inside a part. It should work. Because Touched events only work with an object not a script.
MrFrank79 I’m going to send you a friends request on Roblox later and I’ll explain to you how that script works and what you can do to fix it.
The script is a first child in a cloned part