I have this in my GameScript, and I have almost absolutely no idea what to do.
local sound = game.Workspace.MusicBlock1.Sound local MB1 = game.Workspace.MusicBlock1 local playcall = game.Workspace.MusicBlock1.Sound.IsPlaying
function onTouch(MB1) MB1.sound.playcall = true end
MB1.Touched:connect(onTouch)
As you can see, I want to make my sound play once someone touches the MusicBlock, but it's not performing correctly, saying that there is an error on line 7 (MBI.sound.playcall = true), and that "sound" isn't a valid member of "Part", or "MB1".
Help, please. :)
You're trying to index variables you made in another object as though that object has those properties. It doesn't, though.
MB1.sound.playcall = true
should be
MB1.Sound.IsPlaying = true