Any ideas? Thanks!
function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then local p = game.Players:FindFirstChild(part.Parent.Name) if p ~=nil and p.PlayerGui.RecordRoomMusic.IsPlaying.Value == true then p.PlayerGui.RecordRoomMusic:Stop() end end end script.Parent.Touched:connect(onTouch)
Note - the music is definitely playing when I step on the brick and there are no errors in the output
Not sure if this world effect it or not, but ~~~~~~~~~~~~~~~~~ if (humanoid~=nil) then ~~~~~~~~~~~~~~~~~ Doesn't need brackets.