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

Script to remove footstep sound?

Asked by 8 years ago

I'm trying to remove footstep sounds in a game I'm working on but I have no idea how.

1 answer

Log in to vote
0
Answered by 8 years ago

This script will set the running sound to 0, it does not remove the sound.

Character sounds can be found in the character model under ->Head.

This is just an example script so pls just use it as a reference as I do not know your game design so there may be better ways.

function plrAdd(plr)
    print("player Added")
    plr.CharacterAdded:connect(charAdd) -- connects a character added event to the player

end

function charAdd(char)
    print("Character Added")
    setSoundvolume(char) -- function to set sound volume
end

function setSoundvolume(char)
    local sound = char:WaitForChild("Head"):WaitForChild("Running") -- waits for the characters running sounnd
    sound.Volume = 0 -- sets sound to 0 
end

game.Players.PlayerAdded:connect(plrAdd) --  connects a player added event to the players

Hope this helps.

Ad

Answer this question