I’m trying to create a new sound then play it but it isn’t playing nor being created i tried setting it through a different parent but it still wouldn’t get created.
function PlaySound(Type: string?, Torso: BasePart?)
if Type == "Hit" then
local __SOUND = Instance.new("Sound")
__SOUND.SoundId = "rbxassetid://3932504231"
__SOUND.RollOffMaxDistance = 1000
__SOUND.Parent = Torso
__SOUND.Volume = 1
__SOUND.Playing = true
__ENGINE.Last(__SOUND, __SOUND.TimeLength + 0.1) -- This is just AddItem
elseif Type == "Miss" then
local __SOUND = Instance.new("Sound")
__SOUND.SoundId = "rbxassetid://4754595035"
__SOUND.RollOffMaxDistance = 1100
__SOUND.Parent = Torso
__SOUND.Playing = true
__SOUND.Volume = 0.9
__ENGINE.Last(__SOUND, __SOUND.TimeLength + 0.1) -- This is just AddItem
end
end
if MOVESET == "Punch" then
PlaySound("Miss", PLAYER:FindFirstChild("Right Arm"))
PUNCH:HitStart()
task.delay(0.9,function()
PUNCH:HitStop()
end)
end