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

Why is my sound not going in the game when there is no error?

Asked by
TtuNkK 37
5 years ago
Edited by User#24403 5 years ago

So I'm making a instance.new sound being played when being touched by a part. But the sound wouldn't go in. I don't think it's the volume since I set it to 3. I didn't get any errors either. What do you guys think? Here is my script. ( Ignore all the scripting except the one that starts local sound.)

trigger = script.Parent

trigger.Touched:connect(function(hit)
    -- VARIABLES --

     local neonwall = game.Workspace.NeonRoom.NeonWall
        local neonwall2 = game.Workspace.NeonRoom.NeonWall2
          local neonwall3 = game.Workspace.NeonRoom.NeonWall3
        local neonwall4 = game.Workspace.NeonRoom.NeonWall4
     local neonwall5 = game.Workspace.NeonRoom.NeonWall5


    while true do
        neonwall.BrickColor = BrickColor.Random()
          neonwall2.BrickColor = BrickColor.Random()
            neonwall3.BrickColor = BrickColor.Random()
          neonwall4.BrickColor = BrickColor.Random()
        neonwall5.BrickColor = BrickColor.Random()
          wait(.1)
         end

local sound = Instance.new("Sound", game.StarterGui)
sound.SoundId = "rbxassetid://333430981"
sound.Volume = 3
sound.Looped = false
sound.Name = "Glitch"
local soundclone = sound:Clone()
soundclone.Parent = game.Players[hit.Parent.Name].PlayerGui
game.Players[hit.Parent.Name].PlayerGui.Glitch:Play()


end)
0
Don't Type Like This Your Eyes Go EveryWhere When Trying To Read Your Title User#24403 69 — 5y
0
do you wanna make it so that it is when you touch something? or just through out the entire game DraconianSG 58 — 5y
0
when you touch something TtuNkK 37 — 5y

Answer this question