I’m trying to make an FPS Framework but when I use my equip sounds it just stops everything.
Please be more specific and provide some code
wait
doesn’t affect other scripts.
My framework is handled inside of one client script.
I dunno. Use a coroutine or something. Depends on your setup.
local function equipgun()
game.Workspace.CurrentCamera.Arms:Destroy()
equipped = true
shootable = true
script.Sounds.Equip["equip"..math.random(1,6)]:Play()
local module = require(game.ReplicatedStorage.GunModules[""..currentgun])
local armclone = game.ReplicatedStorage.GunModels[""..currentgun]:clone()
armclone.Parent = game.Workspace.CurrentCamera
armclone.HumanoidRootPart.CFrame = game.Workspace.CurrentCamera.CFrame
armclone.Name = "Arms"
local idleanim = Instance.new("Animation")
idleanim.AnimationId = "rbxassetid://"..module.Idle..""
idle = armclone.Animation:LoadAnimation(idleanim)
local equipanim = Instance.new("Animation")
equipanim.AnimationId = "rbxassetid://"..module.Equip..""
equip = armclone.Animation:LoadAnimation(equipanim)
print(module.Idle)
equip:Play()
idle:Play()
equipsound()
end
This is just a function. I run the equip sound and it stops everything else.
Alright nevermind. I have very bad memories of wait(yourwaitvalue) stopping everything but I must of been wrong.