This sound for my level up system only plays during test mode, any idea why?

s = script.Parent
p = s.Parent
c = p.Character



p.Levelss.XP.Changed:connect(function()
	if p.Levelss.XP.Value >= p.Levelss.Level.Value * 20 then
	p.Levelss.XP.Value = 0
	p.Levelss.Level.Value = p.Levelss.Level.Value + 1
	p.Character.Humanoid.MaxHealth = p.Character.Humanoid.MaxHealth + 10
	p.Character.Humanoid.Health = p.Character.Humanoid.Health + 10
	p.Levelss.FAP.Value = p.Levelss.FAP.Value + 1
	p.PlayerGui.ScreenGui.LevelUpSound:play()
	p.PlayerGui.ScreenGui.LevelUp.TextLevel.Visible = true
	wait(5)
	p.PlayerGui.ScreenGui.LevelUp.TextLevel.Visible = false
	end
end)




c.Humanoid.MaxHealth = p.Levelss.Level.Value * 10 + 100
c.Humanoid.Health = p.Levelss.Level.Value * 10 + 100 

5 comments

0

Possibly because you need to load in the sound with PreLoad()

0

Your title is too broad, thats why it says that.

0

PreLoad() doesn't seem to be working, unless I am doing it wrong. I just add Game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=11597751") To the top of the script. is that the wrong way?

0

I believe it is now "https://", I am not able to access studio at the moment to verify that.

0

Changing it to https didn't work ;-;