Hello. I’ve been messing around with the Collection Service, and I found an error that I can’t explain. I’ve tried looking on the forum, but all of them had to do with datastores.
grenadeProj.Touched:Connect(function(hit)
if CS:HasTag(hit, "Floor") and bounce < 5 then
bounce = bounce + 1
grenadeParticles(bounce, grenadeProj)
bounceHeight = bounceHeight * 0.7
grenadeProj.Velocity = Vector3.new(lookVector.X*40, bounceHeight, lookVector.Z*40)
elseif (hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent ~= player and hit.Name ~= "Handle" ) or bounce >= 5 and not exploded then
grenadeExplode(40, player, grenadeProj)
exploded = true
elseif CS:HasTag("Wall") then
grenadeProj:Destroy()
end
end)
It errors on “elseif CS:HasTag(“Wall”)” and return "Argument 2 missing or nil. Any idea?