Alright,so i made this script to when you enter area in the desert for a DM map music would play,But when i start resource music plays no matter where on the map im at,i want the music to play when you Enter the col shape and, for it to turn off when you leave it,but isn't working,Thanks for help in Advance
DesertMusic = playSound("Music.ogg", true)
setSoundVolume(music,0)
col = createColRectangle (-33.328407287598, 2004.6947021484, 17.640625,50)
function EnterDesert(theElement, matchingDimension )
if ( theElement == getLocalPlayer() ) then
setSoundVolume(music,1)
end
end
addEventHandler ( "onClientColShapeHit", col, EnterDesert)
function LeaveDesert(theElement, matchingDimension)
if ( theElement == getLocalPlayer() ) then
setSoundVolume(music,0)
end
end
addEventHandler("onClientColShapeLeave",col,LeaveDesert)