I made and intro who works good but I tried to make him also stop an sound and doesnt works, here is the script I made, if you know how to fix the script and make it stop playing an sound, please, reply this message.
Script:
I made and intro who works good but I tried to make him also stop an sound and doesnt works, here is the script I made, if you know how to fix the script and make it stop playing an sound, please, reply this message.
Script:
While game is running StarterPlayer isn’t there, Instead find a path to player.PlayerGui.Sound
instead of trying to go to StarterCharacterScripts, go to the actual players character
game.Players.LocalPlayer.Character.LocalScript.Sound:Stop()
What you wanna mean, MasteredCode?
Okay, I just wasted 6 hours for finally discorver I just gotta add another destroy XD, here script working:
local ewderw = game.Workspace.Tuya ------------ NAME OF AUDIO YOU PUT ON WORKSPACE
local camera = game.Workspace.Camera
local menucam = game.Workspace.MenuCamera - WORKSPACE PART FOR AIM CAMERA INTRO
local playbotton = script.Parent.Basita ---------- PLAY BUTTON STARTER GUI
local rataya = script.Parent ----------- WHOLE GUI INTRO
repeat wait()
camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = menucam.CFrame
playbotton.MouseButton1Click:Connect(function()
camera.CameraType = Enum.CameraType.Custom
rataya:Destroy() ------- DESTROY INTRO
ewderw:Destroy() --------- DESTROY AUDIO
end)
Rather than destroying the audio. Stopping it would probably be better.
Destroy is the better way
Just be careful of adverse effects.