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

Why isnt this script working?

Asked by 10 years ago

So ive been trying this script that if the owner joins the game a sound will play.

This is my script:

function ownersSound()
    Player = Game.Players.LocalPlayer
if Player.Name == "DigitalZer3" then
    Script.Sound:Play()
   end

end

1 answer

Log in to vote
2
Answered by 10 years ago

Make sure you're calling the function ownersSound. You also need to make "Script" lowercase. Here's what your code should end up as:

function ownersSound()
    Player = Game.Players.LocalPlayer
    if Player.Name == "DigitalZer3" then
        script.Sound:Play()
    end
end

ownersSound()
Ad

Answer this question