game.Players.PlayerAdded:Connect(function(player)
local MuzzleEvent = player:WaitForChild("gunEvents").Muzzle
local MuzzleStopEvent = player:WaitForChild("gunEvents").MuzzleStop
MuzzleEvent.OnServerEvent:Connect(function(Player)
local Muzzle = Player.Character.Blackout.Preview.MuzzleEffect
local GunFire = player.Character.Blackout.GunFire
GunFire.Playing = true
Muzzle.Enabled = true
while GunFire.Playing == true do
print(GunFire.TimePosition)
if GunFire.TimePosition > 5 and GunFire.TimePosition < 6 then
GunFire.TimePosition = 0
end
wait()
end
end)
MuzzleStopEvent.OnServerEvent:Connect(function(Player)
local Muzzle = player.Character.Blackout.Preview.MuzzleEffect
local GunFire = player.Character.Blackout.GunFire
GunFire.Playing = false
Muzzle.Enabled = false
end)
end)
most of this is controlling the muzzle of the gun, and the other parts are controlling the sound. This is all under a server script.
That wouldn’t change anything, and @Gvvgghnu_Lol you may want to cut off some of the rapid-fire so It’s just two or three beats. In this case, It will loop through those beats one after another because the sound is pretty long and will just continue from where it left off
Audio uploads are free, you could cut it off in a program such as Audacity and then reupload it as the length you would like. Otherwise, this is a very hacky way to do it that I wouldn’t recommend.
I don’t know if you understand. Audacity is a program. You could download the gunshot audio file and use Audacity to trim off the parts you don’t want. It isn’t a music/sfx browser, or whatever you think it is. After you trim it, you reupload the audio and change the ID of your sound.