Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Radio Not Playing Upon Equipped?

I've got a script here I'm using to make a radio play music when equipped and to make the music pause when it is not equipped.

local Sound = script.parent.radio


function Equip()
	Sound:play()
end
	
function Unequip()
	Sound:pause()
end

it does not seem to work. tips?

2 comments

0

is this the full script?

0

yes, it is the full script. i'm quite new so i'm unsure how to do this kind of thing. most of my scripts are very simple.

1 answer

✓ Accepted answer

Capitalization is important.

  1. Its script.Parent
  2. You have to bind your Equip function
  3. You have to bind your Unequip function
  4. Its Sound:Play()
  5. Its Sound:Pause()

To bind your functions, use Tool.Equipped:Connect(Equip) and Tool.Unequipped:Connect(Unequip)

This discussion is preserved as it was. New answers, comments, and votes are closed.