My script that I wrote that shows no sign of error is not working. Could anyone explain to me why this is? Any help would be appreciated!
function OnTouch(hit)
print(hit.Name.."hit me!")
if hit:IsA("MeshPart") then
print(hit.Name.."hit me!")
game.ReplicatedStorage:WaitForChild("vals"):WaitForChild("Winner").Value = hit.Name
script.Parent:Destroy()
end
end
script.Parent.Touched:Connect(OnTouch)
