i have made a cannon that fires a ball, however i want the ball to anchor when it hits the basepart, however it only fires when it touches me
the code as follows is placed in a script in the part
script.Parent.Touched:Connect(function(hit)
if hit.Name == "Baseplate" then
script.Parent.Anchored = true
end
end)

2 comments
Is this code in a local script?
Are you able to give us the screenshot of the workspace?