Sound of effects
Hi, im new to coding here. im trying to make a sound effect ever type a player collides with a object. please review my code. my audio clip is named clip btw.
collision = function() h_dis = abs(player.x - diamond.x) v_dis = abs(player.y - diamond.y) if h_dis <= 23 and v_dis <= 23 then player.speed = player.speed + speedIncrement return true else return false end if h_dis <= 23 and v_dis <= 23 then return audio.play("clip",1,1) end