This is just part of my script.
function onEquipped() UnsheathSound:Play() game.Players:FindFirstChild(Tool.Parent.Name).CameraMode = "LockFirstPerson" end function onUnequipped() UnsheathSound:Pause() game.Players:FindFirstChild(Tool.Parent.Name).CameraMode = "Classic" end
This is what I need it to do...
Play Sound LockFirstPersonCameraType
Pause Sound Classic CameraType
The script
Plays Sound LockFirstPerson
It doesn't
Pause Sound Change Camera back to Classic
I think it has to do with the fact that the tool unequipped. I'm making a crowbar from Half Life with the 2 types of Barrels. The Unsheath is the VALVe logo song.
Okay, here's my best shot. If you're using a Script, use a LocalScript. Copy all the code, delete the Script, and put it in a LocalScript.
Put this code in the LocalScript:
local tool = script.Parent --Put the LocalScript in the Tool local player = game.Players.LocalPlayer local UnsheathSound = tool.Handle.SoundName --Make sure it has a SoundId and is in the Handle! function onEquipped() UnsheathSound:Play() player.CameraMode = "LockFirstPerson" end function onUnequipped() UnsheathSound:Pause() player.CameraMode = "Classic" end
I hope this works.