Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why isnt this script working?

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

✓ Accepted answer

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()

This discussion is preserved as it was. New answers, comments, and votes are closed.