Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

(ANSWERED) Audio in Tool only playing locally?

Asked by 5 years ago
Edited 5 years ago

So basically I have a tool with some Audio in the handle. Pretty standard and it all seemed to work fine until I noticed I could not hear any sound coming from my friends. The order everything that's relevant is in is "Tool > Localscript, Handle > Sounds" Here is a snip of the script:

local SlashSound = Handle.SlashSound

function onEquipped()
    local chr = Tool.Parent
    local hum = chr:FindFirstChild("Humanoid")
    local anime = hum:LoadAnimation(script.Parent.Anims.Equip)
    Handle.UnsheathSound:Play()
    anime:Play()
    wait(0.5)
    Handle.Hum:Play()
end

This is one of the parts that plays the sound. Like I said it will play locally for the player fine it all works. But other players can not hear it. It doesn't make sense to me because I can literally grab any tool with the exact same setup and it will work just fine?

0
It's playing locally because it's in a local script. Local sounds can only be heard on the client that started the sound. DeceptiveCaster 3761 — 5y
0
Are tools not run through a localscript? CrispyBrix 113 — 5y
1
Tools are run through LocalScripts, yes. If you want to have the server play the sound instead of the client, use a RemoteEvent. DeceptiveCaster 3761 — 5y
0
I mean actually I converted the script to a serverscript and it still seems to work fine. So firstly thanks. Secondly any problem you see that may happen if I just keep it this way? CrispyBrix 113 — 5y
1
No. Looks fine even though I don't know where you defined your variables. DeceptiveCaster 3761 — 5y

Answer this question