I'm begging you too help...
So, I have a brick. When I touch that brick it would check in the player who touched it's PlayerGui. If it finds a sound in there then stop it. All of them. Then clones one to the playergui and plays it. This is my script. There is no output.
script.Parent.Touched:connect(function(hit) local hum = hit.Parent:FindFirstChild("Humanoid") if hum then local player = game.Players:GetPlayerFromCharacter(hit.Parent) children = player:WaitForChild("PlayerGui"):GetChildren() for i = 1, #children do if children[i].ClassName == "Sound" then children[i]:Stop()
local music = game.Soundscape.Mainsound music:Clone().Parent = player:WaitForChild("PlayerGui") end end end
end) How to fix?

1 comment
Use Lua Text Box.