It's been a while since I've used Roblox studio, and there have been some changes with the way scripts run. Anyways, the problem is that the cannonball that I'm firing Isn't exploding. When I press the f button, the cannonball fires, but it doesn't explode when it hits something. The code below is the script that is in the cannonball.
script.Parent.Touched:connect(function(part) local explosion = Instance.new("Explosion", script.Parent) explosion.Position = script.Parent.Position wait(.1) script.Parent:Destroy() end)
Everything looks completely fine in this script, and even when I try to print sentences, it does absolutely nothing. Nothing that is put in the script does anything. The cannonball is stored in Replicated Storage, and the script is not disabled. When I press f to fire the cannon, the cannonball is cloned from Replicated Storage, and a body velocity is inserted into it for it to move. It's extremely odd and I have absolutely no idea why it doesn't work.
First of all, change connect to "Connect" and change ".1" to "0.1"
This should fix the problem.
If it still doesn't, comment back.