Here is a GIF: GIF (In the GIF the detector is the RED brick) And the code:
script.Parent.Touched:connect(function(part) if part.Name=="Music" then game.Workspace.Missed.Value=game.Workspace.Missed.Value+1 part:Destroy() end end)
All the parts are named music... so why is it detecting early?
I recomend you adding a "WaitForChild" event so the script will run when the child name gets touched.
Example:
script.Parent.Touched:connect(function(part) part:WaitForChild("Music") if part.Name == "Music" then game.Workspace.Missed.Value=game.Workspace.Missed.Value+1 part:Destroy() --Don't forget to remove the end without the ")" end)
That should fix your problem. BUT in case that doesn't work, try adding a "FindFirstChild" event so the script will run when the child name "Music" is found.
script.Parent.Touched:connect(function(part) part:FindFirstChild("Music") if part.Name == "Music" then game.Workspace.Missed.Value=game.Workspace.Missed.Value+1 part:Destroy() --Don't forget to remove the end without the ")" end)
That should fix your problem either.
If none of these work, then try on a local script (99% sure it won't work but worth the try, eh?)
And If that doesn't work ask someone else ;-;